no message

This commit is contained in:
2025-06-11 17:54:55 +02:00
parent 4105e75357
commit 69a456db88
38 changed files with 2398 additions and 159 deletions

View File

@ -0,0 +1,31 @@
extends State
class_name PlayerWallrun
func get_state_name():
return str(self).split(":")[0]
func enter():
player.wallrun_available = false
player.velocity.x = 2000 * player.facing_direction # An Wand haften
func exit():
player.wallrun_timer = 0.0
func update(delta):
pass
func physics_update(delta):
player.wallrun_timer += delta
player.velocity.y = player.wallrun_speed # Bewegt nach oben
if player.facing_direction > 0 && !player.wallrun_raycast_right2.is_colliding():
Transitioned.emit(self, "PlayerFall")
if player.facing_direction < 1 && !player.wallrun_raycast_left2.is_colliding():
Transitioned.emit(self, "PlayerFall")
elif player.wallrun_timer >= player.wallrun_time:
Transitioned.emit(self, "PlayerWallrunPushoff")
func transitionwallrunpushoff() -> bool:
var result = player.wallrun_timer >= player.wallrun_time
return result