Merge remote-tracking branch 'cvm/demo'

This commit is contained in:
cakipaul 2025-08-09 20:42:16 +08:00
commit a4c6ba1a3b

View File

@ -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):