summaryrefslogtreecommitdiff
path: root/objects
diff options
context:
space:
mode:
authorthe lemons <citrons@mondecitronne.com>2022-12-19 18:28:46 -0600
committerthe lemons <citrons@mondecitronne.com>2022-12-19 18:28:46 -0600
commit94f7fc0d3e410a7c7dc6f6cffe0ed87238608391 (patch)
tree805c7a90ed1adf9bf358868f19ef1e9a072b791d /objects
parentba1b317b3b4de92d7f39dceb988a41840e4fc942 (diff)
world made of chunks with objects in them
Diffstat (limited to 'objects')
-rw-r--r--objects/test.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/objects/test.lua b/objects/test.lua
new file mode 100644
index 0000000..5c2cb1b
--- /dev/null
+++ b/objects/test.lua
@@ -0,0 +1,17 @@
+local test = {}
+
+function test:draw()
+ line(-4, 4, 0, -4, 4, 4, -4, 4)
+ set_color(1, 0.6, 0.7)
+ line(4, -4, 0, 4, -4, -4, 4, -4)
+end
+
+function test:init()
+ self.data.angle = math.random() * math.pi
+end
+
+function test:tick()
+ self.data.angle = self.data.angle + 0.1
+end
+
+return {test = test}