|
@@ -1,18 +1,22 @@
|
1
|
1
|
use std::cmp;
|
2
|
2
|
use std::collections::HashMap;
|
3
|
3
|
|
4
|
|
-use ggez::{Context, event, GameResult, graphics, input};
|
5
|
4
|
use ggez::event::MouseButton;
|
6
|
5
|
use ggez::graphics::{DrawMode, MeshBuilder, StrokeOptions};
|
7
|
6
|
use ggez::timer::check_update_time;
|
|
7
|
+use ggez::{event, graphics, input, Context, GameResult};
|
8
|
8
|
|
9
|
|
-use crate::{ANIMATE_EACH, DEFAULT_SELECTED_SQUARE_SIDE, DEFAULT_SELECTED_SQUARE_SIDE_HALF, DISPLAY_OFFSET_BY, DISPLAY_OFFSET_BY_SPEED, MAX_FRAME_I, META_EACH, PHYSICS_EACH, Point2, SCENE_ITEMS_CHANGE_ERR_MSG, SPRITE_EACH, TARGET_FPS};
|
10
|
9
|
use crate::behavior::ItemBehavior;
|
11
|
|
-use crate::physics::{MetaEvent, PhysicEvent, util};
|
12
|
10
|
use crate::physics::position::GridPosition;
|
|
11
|
+use crate::physics::{util, MetaEvent, PhysicEvent};
|
13
|
12
|
use crate::scene::item::{ItemState, SceneItem, SceneItemType};
|
14
|
|
-use crate::ui::{SceneItemPrepareOrder, UiItem, UiSpriteInfo, UserEvent};
|
15
|
13
|
use crate::ui::scene_item_menu::SceneItemMenuItem;
|
|
14
|
+use crate::ui::{SceneItemPrepareOrder, UiItem, UiSpriteInfo, UserEvent};
|
|
15
|
+use crate::{
|
|
16
|
+ Point2, ANIMATE_EACH, DEFAULT_SELECTED_SQUARE_SIDE, DEFAULT_SELECTED_SQUARE_SIDE_HALF,
|
|
17
|
+ DISPLAY_OFFSET_BY, DISPLAY_OFFSET_BY_SPEED, MAX_FRAME_I, META_EACH, PHYSICS_EACH,
|
|
18
|
+ SCENE_ITEMS_CHANGE_ERR_MSG, SPRITE_EACH, TARGET_FPS,
|
|
19
|
+};
|
16
|
20
|
use ggez::input::keyboard::KeyCode;
|
17
|
21
|
|
18
|
22
|
pub struct MainState {
|