From ad03a0b0812bb8e15e5aa078d7c01eef5ebbdf2e Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 7 Apr 2022 22:22:00 +0100 Subject: restructure --- src/corridor.fnl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/corridor.fnl (limited to 'src/corridor.fnl') 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} -- cgit v1.2.3