Return to repo list

heart-of-gold

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

commit 32e1f5d39adee9d23a576e9d1c7a20eeee72d07a
parent cc11f762e878cda111b4d843f8b9a7693a9acd7c
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Fri, 29 Jan 2021 15:45:34 -0600

snap to first unit after battle intro

Diffstat:
Msrc/turn.py | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/turn.py b/src/turn.py @@ -127,7 +127,6 @@ class TurnManager(manager.Manager): self.current_active_piece.has_guarded = False self.current_active_piece.guarding = False self.current_active_piece.set_animation(self.current_active_piece.sheet.animations["stand_" + self.current_active_piece.facing.name], True) - self.camera.snap_to_position(self.current_active_piece.rect.center) # Predict the next turn order self.project_turn_order() @@ -138,6 +137,9 @@ class TurnManager(manager.Manager): if not b.clickable: b.toggle_activation() + # Snap the camera to the moving piece + self.camera.snap_to_position(self.current_active_piece.rect.center) + # TODO: NOT THIS, OBVIOUSLY if self.current_active_piece.team != TEAMS.Player: self.shift_turns() @@ -227,6 +229,7 @@ class TurnManager(manager.Manager): self.intro_left_decal_topleft = (self.intro_left_decal_topleft[0] + 40, self.intro_left_decal_topleft[1]) self.intro_right_decal_topleft = (self.intro_right_decal_topleft[0] - 40, self.intro_right_decal_topleft[1]) else: + self.camera.snap_to_position(self.current_active_piece.rect.center) self.game.control_mode = CTRL_MODES.Turn_Normal def trigger_button_at_pos(self, pos, double_clicking = False):