summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheav <hheav3@gmail.com>2022-12-27 20:42:35 +0000
committerheav <hheav3@gmail.com>2022-12-27 20:42:35 +0000
commit8693fb71a5cb7d385a03566ac5d16c8af0c05bd8 (patch)
treed5a17e59047b1ed054392fbed0b6b793982e79b9
parent39f2b26e369c295201fd3f034e7b67c5565bd26d (diff)
total energy display, for purposes.
-rw-r--r--main.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.lua b/main.lua
index 31225fa..19215b1 100644
--- a/main.lua
+++ b/main.lua
@@ -1,4 +1,5 @@
local obj = require "obj"
+local text = require "text"
obj.load_types()
line = love.graphics.line
@@ -25,6 +26,8 @@ end
obj.new("test", {0, 0})
+obj.new("heav_object", {100, 0})
+
local function window_scale()
local w, h = love.graphics.getDimensions()
return 256 / math.min(w, h)
@@ -98,6 +101,8 @@ local function draw_hud()
love.graphics.applyTransform(window_transform())
love.graphics.setLineWidth(line_width)
-- things
+ local total_energy = obj.total_energy()
+ text.draw("total energy "..total_energy, 10, 10)
love.graphics.pop()
end