summaryrefslogtreecommitdiff
path: root/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-12-03 18:39:56 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-12-03 18:39:56 -0300
commitef5bce4721d1307200b1335565303a7832f77535 (patch)
treef1840a3e31dcf4cda066d5f377edb4ff2af31622 /src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua
parent1a9e17acb3a65a98305d19363f6b4e7185356c74 (diff)
Keep the code more KISS - part 2
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua')
-rw-r--r--src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua
new file mode 100644
index 0000000..a13244a
--- /dev/null
+++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua
@@ -0,0 +1,28 @@
+main.draw = function()
+ local currentTime = love.timer.getTime()
+ if nextTime <= currentTime then
+ nextTime = currentTime
+ return
+ end
+ love.timer.sleep(nextTime - currentTime)
+
+ love.graphics.scale(windowProfile.scale.x, windowProfile.scale.y)
+
+ love.graphics.print('FPS: ' .. love.timer.getFPS(), 0, 0)
+
+ draw = {
+ bola = love.graphics.draw(
+ metaSprites.bola.image,
+ quad.bola,
+ character.bola.position.x,
+ character.bola.position.y,
+ character.bola.orientation,
+ character.bola.scale.x,
+ character.bola.scale.y,
+ character.bola.origin.x,
+ character.bola.origin.y
+ )
+ }
+-- bolaDraw.motion()
+-- game.draw(metaSprites.bola, quad.bola, character.bola)
+end