diff options
| author | Jakob L. Kreuze <jakob@memeware.net> | 2018-10-26 14:13:54 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze <jakob@memeware.net> | 2018-10-26 14:13:54 -0400 |
| commit | a610d4f3c513107135ece5276afffa4223c7ee4b (patch) | |
| tree | 5bf84c3afe6608f3b3582240587a29f86b9d7c3e /world.fnl | |
| parent | 558d16e8b2577f9c698a75b833dfc08af4133db9 (diff) | |
Rest of greetz and maps. Game is essentially complete
Diffstat (limited to 'world.fnl')
| -rw-r--r-- | world.fnl | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -107,9 +107,9 @@ (fn draw-world [world camera-x camera-y screen-width screen-height] (love.graphics.clear 0.1 0.1 0.1) (draw-map world camera-x camera-y screen-width screen-height) - (draw-object (. world :player) camera-x camera-y) (each [_ slimeball (ipairs (. world :slimeballs))] (draw-object slimeball camera-x camera-y)) + (draw-object (. world :player) camera-x camera-y) (draw-hud world screen-width screen-height)) ;; Returns whether or not `tile' exists in `checked'. @@ -264,7 +264,7 @@ (fn move-slimeball [world slimeball dt] (let [collision-map (. world :collision-map) (goal-x goal-y) (: slimeball :next-position dt) - filter (fn [] "cross") + filter (fn [_ other] (if (. other :is-tile) "touch" "cross")) (x y collisions _) (: collision-map :move slimeball goal-x goal-y filter)] (each [_ collision (ipairs collisions)] (let [other (. collision :other) |