|
@@ -1,26 +1,23 @@
|
1
|
1
|
# coding: utf-8
|
|
2
|
+
|
2
|
3
|
from pyglet.window import key
|
3
|
|
-from cocos.actions import MoveTo as BaseMoveTo
|
4
|
|
-from sandbox.tile.gui.move import MoveActorInteraction
|
5
|
|
-from sandbox.tile.gui.move import MoveFastActorInteraction
|
6
|
|
-from sandbox.tile.gui.move import MoveCrawlActorInteraction
|
7
|
|
-from synergine2_cocos2d.layer import LayerManager
|
8
|
|
-from synergine2_xyz.move.simulation import FinishMoveEvent
|
9
|
|
-from synergine2_xyz.move.simulation import StartMoveEvent
|
10
|
4
|
|
11
|
|
-from synergine2_xyz.utils import get_angle
|
|
5
|
+from cocos.actions import MoveTo as BaseMoveTo
|
|
6
|
+from sandbox.tile.user_action import UserAction
|
12
|
7
|
from synergine2.config import Config
|
13
|
8
|
from synergine2.log import SynergineLogger
|
14
|
9
|
from synergine2.terminals import Terminal
|
15
|
|
-from synergine2_cocos2d.gui import TMXGui
|
16
|
|
-from synergine2_cocos2d.gui import EditLayer as BaseEditLayer
|
17
|
10
|
from synergine2_cocos2d.actions import MoveTo
|
18
|
|
-from synergine2_cocos2d.animation import Animate
|
19
|
11
|
# TODO NOW: MOVE
|
20
|
12
|
from synergine2_cocos2d.animation import ANIMATION_CRAWL
|
21
|
13
|
from synergine2_cocos2d.animation import ANIMATION_WALK
|
22
|
|
-
|
23
|
|
-from sandbox.tile.user_action import UserAction
|
|
14
|
+from synergine2_cocos2d.animation import Animate
|
|
15
|
+from synergine2_cocos2d.gui import EditLayer as BaseEditLayer
|
|
16
|
+from synergine2_cocos2d.gui import TMXGui
|
|
17
|
+from synergine2_cocos2d.layer import LayerManager
|
|
18
|
+from synergine2_xyz.move.simulation import FinishMoveEvent
|
|
19
|
+from synergine2_xyz.move.simulation import StartMoveEvent
|
|
20
|
+from synergine2_xyz.utils import get_angle
|
24
|
21
|
|
25
|
22
|
|
26
|
23
|
class EditLayer(BaseEditLayer):
|
|
@@ -73,6 +70,11 @@ class Game(TMXGui):
|
73
|
70
|
self.move_crawl_duration_ref = float(self.config.resolve('game.move.crawl_ref_time'))
|
74
|
71
|
|
75
|
72
|
def before_run(self) -> None:
|
|
73
|
+ from sandbox.tile.gui.move import MoveActorInteraction
|
|
74
|
+ from sandbox.tile.gui.move import MoveFastActorInteraction
|
|
75
|
+ from sandbox.tile.gui.move import MoveCrawlActorInteraction
|
|
76
|
+ from sandbox.tile.gui.fire import FireActorInteraction
|
|
77
|
+
|
76
|
78
|
self.layer_manager.interaction_manager.register(MoveActorInteraction, self.layer_manager)
|
77
|
79
|
self.layer_manager.interaction_manager.register(MoveFastActorInteraction, self.layer_manager)
|
78
|
80
|
self.layer_manager.interaction_manager.register(MoveCrawlActorInteraction, self.layer_manager)
|