aboutsummaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/main.lua b/main.lua
index 2b23b5b..804a355 100644
--- a/main.lua
+++ b/main.lua
@@ -12,6 +12,14 @@ function love.load()
set_scene(scn)
new_player(100, 100)
+
+ box1 = phys.Box.new(20, 20, 16, 16, {
+ layers = {},
+ mask = {"hard"},
+ })
+
+ ground1 = phys.Box.new(5, 50, 64, 16, {})
+ ground2 = phys.Box.new(64-16, 50+16, 16, 64, {})
end
function love.update(dt)
@@ -19,6 +27,7 @@ function love.update(dt)
assert(scn, "No scene set.")
fire_event(scn.on_update, dt)
+ box1:update(0, 5, dt)
flush_scene()
end
@@ -32,6 +41,10 @@ function love.draw(dt)
fire_event(scn.on_draw, dt)
+ box1:draw()
+ ground1:draw()
+ ground2:draw()
+
-- TODO: Take care of weird displays
lg.setCanvas()
local scr_width, scr_height = lg.getDimensions()