diff --git a/scene/character/main_player.gd b/scene/character/main_player.gd index 733ffd24..274a2861 100644 --- a/scene/character/main_player.gd +++ b/scene/character/main_player.gd @@ -261,6 +261,9 @@ func player_action(action_code: int, auto_quit: bool): animation_l = config[3] animation_r = config[4] var playing_animation = _sprite_play_with_auto_flip_h(animation_l, animation_r) + # 如果 flip_h, 则 offset.x 取镜像 + if sprite.flip_h: + sprite.offset.x = -sprite.offset.x # reset animation after one play if sprite.sprite_frames.get_animation_loop(playing_animation): if auto_quit and not sprite.animation_looped.is_connected(_play_animation):