From 058b965329d952564089ce95bc6c39a61419992e Mon Sep 17 00:00:00 2001 From: AleaJactaEst Date: Sun, 6 Feb 2022 01:55:11 +0100 Subject: [PATCH] update swim animation --- player/player.gd | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/player/player.gd b/player/player.gd index cef6624..0021e6d 100644 --- a/player/player.gd +++ b/player/player.gd @@ -63,14 +63,14 @@ var anim_fly_strafe_right_walk:String = "CHAR_sitting_ground_idle" var anim_fly_walk:String = "CHAR_sitting_ground_idle" var anim_fly_walk_backward:String = "CHAR_sitting_ground_idle" -var anim_swim_idle:String = "CHAR_walk" -var anim_swim_run:String = "CHAR_run" -var anim_swim_run_backward:String = "CHAR_run backward" -var anim_swim_sitting_ground_idle:String = "CHAR_walk" -var anim_swim_strafe_left_walk:String = "CHAR_walk" -var anim_swim_strafe_right_walk:String = "CHAR_walk" -var anim_swim_walk:String = "CHAR_walk" -var anim_swim_walk_backward:String = "CHAR_walk_backward" +var anim_swim_idle:String = "CHAR_swim_idle" +var anim_swim_run:String = "CHAR_swim_slow" +var anim_swim_run_backward:String = "CHAR_swim_idle" +var anim_swim_sitting_ground_idle:String = "CHAR_swim_idle" +var anim_swim_strafe_left_walk:String = "CHAR_swim_idle" +var anim_swim_strafe_right_walk:String = "CHAR_swim_idle" +var anim_swim_walk:String = "CHAR_swim_slow" +var anim_swim_walk_backward:String = "CHAR_swim_idle" var current_anim:String = anim_idle var player_sit:bool = false @@ -570,53 +570,53 @@ func _physics_process_swim(delta): if move_strafe: if move_up: speed = SPEED_RUN_UP_STRAFE - switch_animation(anim_fly_run) + switch_animation(anim_swim_run) elif move_down: speed = SPEED_RUN_DOWN_STRAFE - switch_animation(anim_fly_run_backward) + switch_animation(anim_swim_run_backward) else: speed = SPEED_RUN_STRAFE if input_x > 0.0: - switch_animation(anim_fly_strafe_left_walk) + switch_animation(anim_swim_strafe_left_walk) else: - switch_animation(anim_fly_strafe_right_walk) + switch_animation(anim_swim_strafe_right_walk) elif move_up: speed = SPEED_RUN_UP - switch_animation(anim_fly_run) + switch_animation(anim_swim_run) else: speed = SPEED_RUN_DOWN if move_down: - switch_animation(anim_fly_run_backward) + switch_animation(anim_swim_run_backward) else: - switch_animation(anim_fly_idle) + switch_animation(anim_swim_idle) else: if move_strafe: if move_up: speed = SPEED_WALK_UP_STRAFE - switch_animation(anim_fly_walk) + switch_animation(anim_swim_walk) elif move_down: speed = SPEED_WALK_DOWN_STRAFE - switch_animation(anim_fly_walk_backward) + switch_animation(anim_swim_walk_backward) else: speed = SPEED_WALK_STRAFE if input_x > 0.0: - switch_animation(anim_fly_strafe_left_walk) + switch_animation(anim_swim_strafe_left_walk) else: - switch_animation(anim_fly_strafe_right_walk) + switch_animation(anim_swim_strafe_right_walk) elif move_up: speed = SPEED_WALK_UP - switch_animation(anim_fly_walk) + switch_animation(anim_swim_walk) else: speed = SPEED_WALK_DOWN if move_down: - switch_animation(anim_fly_walk_backward) + switch_animation(anim_swim_walk_backward) else: - switch_animation(anim_fly_idle) + switch_animation(anim_swim_idle) if input_x == 0.0 and input_y == 0.0: if player_sit: - switch_animation(anim_fly_sitting_ground_idle) + switch_animation(anim_swim_sitting_ground_idle) else: - switch_animation(anim_fly_idle) + switch_animation(anim_swim_idle) var direction = (transform.basis * Vector3(input_x, input_z, input_y)).normalized() if direction: