edging: la princesse utilise son animation proche du vide
Et voilà, j'aurais du le faire en juin! mais les vacances toussa toussa, maintenant en tout cas, c'est le cas tralala.
This commit is contained in:
@@ -85,6 +85,7 @@ var walking_step: int = -1 # où la princesse en est dans son tableau d'accel
|
||||
var walk_incr_reserve : int = 0 # utilisé pour la différence ralentissement air/sol
|
||||
var init_decel: bool = true # utilisé pour initialiser la décélération
|
||||
var init_direction_change = true # utilisé pour initialiser le changement de direction
|
||||
var near_cliff = false
|
||||
|
||||
# variables d'état relatives au saut
|
||||
var jumping : bool = false # Princesse est-elle en train de sauter ?
|
||||
@@ -151,6 +152,7 @@ func copy_from(other : Princess):
|
||||
dash_direction_x = other.dash_direction_x
|
||||
dash_direction_y = other.dash_direction_y
|
||||
available_dashs = other.available_dashs
|
||||
near_cliff = other.near_cliff
|
||||
|
||||
################################################################################
|
||||
#
|
||||
@@ -554,6 +556,7 @@ func read_input() -> void:
|
||||
|
||||
func compute_state() -> void:
|
||||
collide_ground_far_detect = ground_far_detect.is_colliding() or ground_far_detect2.is_colliding()
|
||||
near_cliff = collide_ground_far_detect and not(ground_far_detect.is_colliding() and ground_far_detect2.is_colliding())
|
||||
collide_wall_far_detect = (
|
||||
wall_far_detect_left.is_colliding() or
|
||||
wall_detect_left2.is_colliding() or
|
||||
@@ -597,7 +600,10 @@ func get_new_animation() -> String:
|
||||
if walking_step > 0:
|
||||
animation_new = "walk"
|
||||
else:
|
||||
animation_new = "idle"
|
||||
if near_cliff:
|
||||
animation_new = "near_cliff"
|
||||
else:
|
||||
animation_new = "idle"
|
||||
else:
|
||||
if velocity.y > 0.0:
|
||||
if get_coyote(coyote_grab):
|
||||
|
||||
Reference in New Issue
Block a user