Return to repo list

heart-of-gold

Tactical RPG written in python, using pygame.
Return to HMagellan.com

commit 03abaa0a5dc0bcf4ef97fc80f436ecaecac53a5f
parent e099989e6e2f07494e18cc8004328cd5b43e1aa8
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Tue, 29 Dec 2020 16:22:00 -0600

Now can set init camera pos for board

Diffstat:
Mdata/board/testmap1/events.json | 3++-
Msrc/turn.py | 2++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/data/board/testmap1/events.json b/data/board/testmap1/events.json @@ -1,4 +1,5 @@ { "start_dialog" : "testdia.json", - "end_dialog" : null + "end_dialog" : null, + "init_camera_pos" : [500, 500] } diff --git a/src/turn.py b/src/turn.py @@ -79,6 +79,8 @@ class TurnManager(manager.Manager): nab.set_position(((SCREEN_WIDTH // 8), (SCREEN_HEIGHT // 10) + (((SCREEN_HEIGHT // 14) - 4)) * b)) self.action_buttons.append(nab) self.shift_turns() + # NOTE: This happens here to properly snap after the snap involved in a turn shift. This is, again, not pretty + self.camera.snap_to_position(tuple(self.board_events["init_camera_pos"])) self.intro_timer = 70 self.intro_left_decal = sheets["battle_intro_decal_1"].sprites[(0, 0)] self.intro_left_decal_topleft = (-1920, 460)