no message
This commit is contained in:
30
sidescroller/scripts/playerfall.gd
Normal file
30
sidescroller/scripts/playerfall.gd
Normal file
@ -0,0 +1,30 @@
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user