31 lines
567 B
GDScript
31 lines
567 B
GDScript
extends State
|
|
class_name PlayerFall
|
|
|
|
func get_state_name():
|
|
return str(self).split(":")[0]
|
|
|
|
func enter():
|
|
pass
|
|
|
|
func exit():
|
|
pass
|
|
|
|
func update(delta):
|
|
player.ap.play("fall")
|
|
|
|
if player.transitionledgegrab():
|
|
Transitioned.emit(self, "PlayerLedgeGrab")
|
|
elif player.transitiondoublejump():
|
|
Transitioned.emit(self, "PlayerDoubleJump")
|
|
elif player.transitionidle():
|
|
Transitioned.emit(self, "PlayerIdle")
|
|
elif player.transitionrun():
|
|
Transitioned.emit(self, "PlayerRun")
|
|
|
|
player.gravity()
|
|
|
|
func physics_update(delta):
|
|
pass
|
|
#player.turnmovement()
|
|
|