summaryrefslogtreecommitdiff
path: root/src/corridor.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'src/corridor.fnl')
-rw-r--r--src/corridor.fnl24
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}