diff options
author | ubq323 <ubq323@ubq323.website> | 2022-04-07 22:22:00 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2022-04-07 22:22:00 +0100 |
commit | ad03a0b0812bb8e15e5aa078d7c01eef5ebbdf2e (patch) | |
tree | 3641114fa3e5d38d072c5a9cbfd8e871be0feeb1 /src/corridor.fnl | |
parent | 4ec2e421bd05fb178c5bf8317606b4fadd622b54 (diff) |
restructure
Diffstat (limited to 'src/corridor.fnl')
-rw-r--r-- | src/corridor.fnl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/corridor.fnl b/src/corridor.fnl new file mode 100644 index 0000000..8f1a6a0 --- /dev/null +++ b/src/corridor.fnl @@ -0,0 +1,24 @@ +;; corridor +;; maybe make this generic enough to have multiple +;; corridors with the same code, eventually + +(local player (require :src.player)) + +(fn make [state] + (local font state.font) + (local title (love.graphics.newText font :corridor)) + (local player (player.make)) + (fn draw [] + (love.graphics.setColor 0.8 0.8 0.8) + (love.graphics.setLineWidth 10) + (love.graphics.rectangle :line 30 80 580 370) + (love.graphics.draw title (- 610 (title:getWidth)) -10) + (player:draw)) + + (fn update [dt] + (player:update dt)) + + {: draw + : update}) + +{: make} |