fixed placer movement

This commit is contained in:
Jonas Mucke
2020-04-19 18:27:48 +02:00
parent dd227744ac
commit 1a58a9689e
2 changed files with 13 additions and 9 deletions

View File

@@ -49,25 +49,28 @@ func _physics_process(delta):
while(totaldamage < -1):
totaldamage+=1
player_stats.health+=1
adjustPrio(player_stats.health, player_stats.max_health)
#adjustPrio(player_stats.health, player_stats.max_health)
_debug_update()
if debug == true:
match movementState:
moveState.MOVE:
movement_move(delta)
moveState.IDLE:
movement_move(delta)
moveState.ROLL:
movement_roll()
moveState.HIT:
movement_hit()
elif movementState == moveState.ROLL:
movement_roll()
elif movementState == moveState.HIT:
movement_hit()
elif movementState == moveState.IDLE:
movement_idle()
else:
movement_run(Vector2(0,0), delta)
makeMove(delta)
if movementState == moveState.ROLL:
movement_roll()
elif movementState == moveState.HIT:
movement_hit()
elif movementState == moveState.IDLE:
movement_idle()
else:
movement_run(Vector2(0,0), delta)
makeMove(delta)
move()
# IMPORTANT: If you are using move_and_slide don't multiply by delta