From 8693fb71a5cb7d385a03566ac5d16c8af0c05bd8 Mon Sep 17 00:00:00 2001 From: heav Date: Tue, 27 Dec 2022 20:42:35 +0000 Subject: total energy display, for purposes. --- main.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main.lua') 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 -- cgit v1.2.3