diff options
| author | Jakob L. Kreuze <jakob@memeware.net> | 2018-10-24 16:50:38 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze <jakob@memeware.net> | 2018-10-24 16:50:38 -0400 |
| commit | 0cb68be20bc265a2635725cace43a634fdb539da (patch) | |
| tree | 924d7db900a7404e91a5a0e335023add26dc0b09 /player.fnl | |
| parent | a3dca42441aa48b789e9730edef4ffb63e4de94c (diff) | |
Initial HUD implementation
Diffstat (limited to 'player.fnl')
| -rw-r--r-- | player.fnl | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |