level 3
This commit is contained in:
@@ -27,10 +27,10 @@ func _physics_process(delta):
|
||||
if ray_cast_left_2 == null:
|
||||
return
|
||||
|
||||
if ray_cast_left.is_colliding() or ray_cast_left_2.is_colliding():
|
||||
if (ray_cast_left.is_colliding() or ray_cast_left_2.is_colliding()) and not is_down:
|
||||
speed = abs(speed)
|
||||
animated_sprite_2d.flip_h = true
|
||||
elif ray_cast_right.is_colliding() or ray_cast_right_2.is_colliding():
|
||||
elif (ray_cast_right.is_colliding() or ray_cast_right_2.is_colliding()) and not is_down:
|
||||
speed = -abs(speed)
|
||||
animated_sprite_2d.flip_h = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user