player 如果 flip_h, 则 offset.x 取镜像
This commit is contained in:
parent
367fefba08
commit
e541b77052
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user