summaryrefslogtreecommitdiff
path: root/game.lua
diff options
context:
space:
mode:
Diffstat (limited to 'game.lua')
-rw-r--r--game.lua43
1 files changed, 0 insertions, 43 deletions
diff --git a/game.lua b/game.lua
deleted file mode 100644
index 16b1e06..0000000
--- a/game.lua
+++ /dev/null
@@ -1,43 +0,0 @@
-local Obj = require 'Obj'
-
-local M = {}
-
-M.all_objects = {}
-
-M.Object = Obj:extend()
-M.Object.z = 0
-
-function M.Object:new(pos, rotation, scale)
- self.pos = pos or {0, 0, 0}
- self.rot = rotation or 0
- self.scale = scale or 1
- self:enable()
-end
-
-function M.Object:enable()
- M.all_objects[self] = true
-end
-
-function M.Object:disable()
- M.all_objects[self] = nil
-end
-
-function M.Object:update()
-end
-
-function M.Object:draw()
- if self.sprite then
- local x, y = unpack(self.pos)
- local w, h = self.sprite:getDimensions()
- ox = (w * self.scale) / 2
- oy = (h * self.scale) / 2
- love.graphics.draw(
- self.sprite, x, y, self.rot, self.scale, self.scale, ox, oy)
- end
-end
-
-function M.Object:visible()
- return not self.hidden
-end
-
-return M