From 0cb68be20bc265a2635725cace43a634fdb539da Mon Sep 17 00:00:00 2001 From: "Jakob L. Kreuze" Date: Wed, 24 Oct 2018 16:50:38 -0400 Subject: Initial HUD implementation --- player.fnl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'player.fnl') diff --git a/player.fnl b/player.fnl index 058902b..0a1bf1f 100644 --- a/player.fnl +++ b/player.fnl @@ -108,6 +108,7 @@ walking 1 :else 0))) +;; Statefully modifies the animation parameters associated with `player'. (fn update-player-animations [player dt] (when (> 10 (math.abs (. player :y-vel))) (tset player :action :jump false)) @@ -117,7 +118,6 @@ (tset player :animation-y-offset (next-player-animation-y-offset player)) (when (> 0 (. player :animation-timer)) (tset player :animation-timer 0.1))) - ;; Returns a new player object. (fn new-player [] @@ -133,6 +133,9 @@ :x-vel 0 :y-vel 0 + :cur-health 5 + :max-health 5 + :orientation :right :animation-x-offset 0 :animation-y-offset 0 -- cgit v1.3