mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-12 21:42:23 +02:00
Statsscript with speed
This commit is contained in:
@@ -11,6 +11,8 @@ export(int, 0, 500) var ROLL_SPEED := 150
|
||||
export(int, 0, 500) var FRICTION := 200 # Speed at which the player deaccelarates
|
||||
export(int, 0, 500) var ACCELERATION := 450
|
||||
# Reference for the current player
|
||||
onready var debug_label := $DebugLabel
|
||||
onready var player_stats := $Stats
|
||||
onready var animation_player := $AnimationPlayer
|
||||
onready var animation_tree := $AnimationTree
|
||||
onready var animation_state = animation_tree.get("parameters/playback")
|
||||
@@ -23,7 +25,12 @@ enum moveState{
|
||||
|
||||
var movementState = moveState.MOVE
|
||||
|
||||
func _debug_update():
|
||||
debug_label.text = str(player_stats.health) + "/" + str(player_stats.max_health) + " HP"
|
||||
|
||||
|
||||
func _physics_process(delta):
|
||||
_debug_update()
|
||||
match movementState:
|
||||
moveState.MOVE:
|
||||
movement_move(delta)
|
||||
|
||||
Reference in New Issue
Block a user