princesse: ménage
nettoyage de quelques restes du passé qui ne sont plus utilses aujourd'hui
This commit is contained in:
@@ -9,7 +9,7 @@ var gravity: int = ProjectSettings.get("physics/2d/default_gravity")
|
||||
@onready var wall_detect_right := $wall_detect_right as RayCast2D
|
||||
@onready var animation := $AnimatedSprite2D as AnimatedSprite2D
|
||||
@onready var camera := $Camera2D as Camera2D
|
||||
var _double_jump_charged := false
|
||||
|
||||
|
||||
@export var WALKING_SPEED = 400
|
||||
@export var FALLING_SPEED = 400
|
||||
@@ -122,7 +122,7 @@ func fall() -> float:
|
||||
if jumping:
|
||||
falling_step = -1
|
||||
return velocity.y
|
||||
if is_on_floor():
|
||||
if is_on_floor_only():
|
||||
if get_floor_normal()[0] < 0: # pente à gauche
|
||||
if direction >= 0:# on va à droite, désactive la gravité
|
||||
falling_step = -1
|
||||
@@ -228,14 +228,13 @@ func _physics_process(delta: float) -> void:
|
||||
if layer_of_collision == PICS_BLOCK_LAYER:
|
||||
get_tree(). reload_current_scene()
|
||||
|
||||
|
||||
var anim := get_new_animation(false)
|
||||
var anim := get_new_animation()
|
||||
if anim != animation.animation:
|
||||
animation.animation = anim
|
||||
animation.play()
|
||||
|
||||
|
||||
func get_new_animation(is_shooting := false) -> String:
|
||||
func get_new_animation() -> String:
|
||||
var animation_new: String
|
||||
|
||||
if is_on_floor():
|
||||
|
||||
Reference in New Issue
Block a user