diff --git a/script/character/view.gd b/script/character/view.gd index 227fe41..ef2c5e9 100644 --- a/script/character/view.gd +++ b/script/character/view.gd @@ -90,7 +90,11 @@ func init(default:SpriteFrames): func reset(): sprite_frames = move_sprite_frames - play_animation("idle_loop") + if status.is_on_floor: + play_animation("idle_loop") + else: + play_animation("jump4_loop") + func run(from:StringName,to:StringName): _add_trans(from,to,"","","","",true) @@ -165,6 +169,7 @@ func _update_material(): func play_animation(animation_name:String): if not sprite_frames.has_animation(animation_name): + print("无效动画:",animation_name) return if animation_name == animation: frame = 0