|
@@ -14,9 +14,9 @@ from pyglet.window import key
|
14
|
14
|
from cocos.actions import MoveTo as BaseMoveTo
|
15
|
15
|
from cocos.audio.pygame.mixer import Sound
|
16
|
16
|
|
17
|
|
-from opencc.simulation.interior import InteriorManager
|
18
|
|
-from opencc.simulation.tmx import TileMap
|
19
|
|
-from opencc.user_action import UserAction
|
|
17
|
+from opencombat.simulation.interior import InteriorManager
|
|
18
|
+from opencombat.simulation.tmx import TileMap
|
|
19
|
+from opencombat.user_action import UserAction
|
20
|
20
|
from synergine2.config import Config
|
21
|
21
|
from synergine2.log import SynergineLogger
|
22
|
22
|
from synergine2.terminals import Terminal
|
|
@@ -32,10 +32,10 @@ from synergine2_xyz.move.simulation import FinishMoveEvent
|
32
|
32
|
from synergine2_xyz.move.simulation import StartMoveEvent
|
33
|
33
|
from synergine2_xyz.physics import Physics
|
34
|
34
|
from synergine2_xyz.utils import get_angle
|
35
|
|
-from opencc.simulation.event import NewVisibleOpponent
|
36
|
|
-from opencc.simulation.event import NoLongerVisibleOpponent
|
37
|
|
-from opencc.simulation.event import FireEvent
|
38
|
|
-from opencc.simulation.event import DieEvent
|
|
35
|
+from opencombat.simulation.event import NewVisibleOpponent
|
|
36
|
+from opencombat.simulation.event import NoLongerVisibleOpponent
|
|
37
|
+from opencombat.simulation.event import FireEvent
|
|
38
|
+from opencombat.simulation.event import DieEvent
|
39
|
39
|
|
40
|
40
|
|
41
|
41
|
class EditLayer(BaseEditLayer):
|
|
@@ -45,7 +45,7 @@ class EditLayer(BaseEditLayer):
|
45
|
45
|
# TODO BS 20171213: Into other layer !
|
46
|
46
|
self.last_interior_draw = 0
|
47
|
47
|
# FIXME BS: hardcoded (move into other layer)
|
48
|
|
- self.interior_manager = InteriorManager(TileMap('opencc/maps/003/003.tmx'))
|
|
48
|
+ self.interior_manager = InteriorManager(TileMap('opencombat/maps/003/003.tmx'))
|
49
|
49
|
|
50
|
50
|
def _on_key_press(self, k, m):
|
51
|
51
|
if self.selection:
|
|
@@ -76,7 +76,7 @@ class EditLayer(BaseEditLayer):
|
76
|
76
|
|
77
|
77
|
if interiors:
|
78
|
78
|
# FIXME: hardcoded
|
79
|
|
- image = Image.open('opencc/maps/003/background.png')
|
|
79
|
+ image = Image.open('opencombat/maps/003/background.png')
|
80
|
80
|
image_fake_file = io.BytesIO()
|
81
|
81
|
# FIXME: tile height/width !
|
82
|
82
|
self.interior_manager.update_image_for_interiors(image, interiors, 8, 8)
|
|
@@ -128,7 +128,7 @@ class Game(TMXGui):
|
128
|
128
|
read_queue_interval=read_queue_interval,
|
129
|
129
|
map_dir_path=map_dir_path,
|
130
|
130
|
)
|
131
|
|
- self.sound_lib = AudioLibrary('opencc/sounds/')
|
|
131
|
+ self.sound_lib = AudioLibrary('opencombat/sounds/')
|
132
|
132
|
|
133
|
133
|
self.terminal.register_event_handler(
|
134
|
134
|
FinishMoveEvent,
|
|
@@ -166,10 +166,10 @@ class Game(TMXGui):
|
166
|
166
|
self.move_crawl_duration_ref = float(self.config.resolve('game.move.crawl_ref_time'))
|
167
|
167
|
|
168
|
168
|
def before_run(self) -> None:
|
169
|
|
- from opencc.gui.move import MoveActorInteraction
|
170
|
|
- from opencc.gui.move import MoveFastActorInteraction
|
171
|
|
- from opencc.gui.move import MoveCrawlActorInteraction
|
172
|
|
- from opencc.gui.fire import FireActorInteraction
|
|
169
|
+ from opencombat.gui.move import MoveActorInteraction
|
|
170
|
+ from opencombat.gui.move import MoveFastActorInteraction
|
|
171
|
+ from opencombat.gui.move import MoveCrawlActorInteraction
|
|
172
|
+ from opencombat.gui.fire import FireActorInteraction
|
173
|
173
|
|
174
|
174
|
self.layer_manager.interaction_manager.register(MoveActorInteraction, self.layer_manager)
|
175
|
175
|
self.layer_manager.interaction_manager.register(MoveFastActorInteraction, self.layer_manager)
|
|
@@ -275,6 +275,6 @@ class Game(TMXGui):
|
275
|
275
|
|
276
|
276
|
def subject_die(self, event: DieEvent) -> None:
|
277
|
277
|
killed_actor = self.layer_manager.subject_layer.subjects_index[event.shoot_subject_id]
|
278
|
|
- dead_image = pyglet.resource.image('opencc/maps/003/actors/man_d1.png')
|
|
278
|
+ dead_image = pyglet.resource.image('opencombat/maps/003/actors/man_d1.png')
|
279
|
279
|
killed_actor.update_image(dead_image)
|
280
|
280
|
killed_actor.freeze()
|