summaryrefslogtreecommitdiff
path: root/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-12-03 19:31:00 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-12-03 19:31:00 -0300
commit61207011c466bc9cd7d4f275d6befabee1b75ae7 (patch)
tree72613d0350f831ca1d37d1614ec138636a31dddf /src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update
parentef5bce4721d1307200b1335565303a7832f77535 (diff)
Keep the code more KISS - part 3
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update')
-rw-r--r--src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/gravity.lua4
-rw-r--r--src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/limit.lua1
2 files changed, 1 insertions, 4 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/gravity.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/gravity.lua
index 5242f90..7e28588 100644
--- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/gravity.lua
+++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/gravity.lua
@@ -1,8 +1,4 @@
update.gravity = function(dt)
- gravity(dt)
-end
-
-function gravity(dt)
if character.bola.jump.velocity ~= 0 then
character.bola.jump.isJumping = true
character.bola.position.y = character.bola.position.y + (character.bola.jump.velocity * dt)
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/limit.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/limit.lua
index 9df7079..3990db0 100644
--- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/limit.lua
+++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/limit.lua
@@ -4,6 +4,7 @@ update.limit = function(dt)
elseif character.bola.position.x >= windowProfile.mode.width - character.bola.origin.x then
character.bola.position.x = windowProfile.mode.width - character.bola.origin.x
end
+
if character.bola.position.y <= character.bola.origin.y then
character.bola.position.y = character.bola.origin.y
elseif character.bola.position.y >= windowProfile.mode.height - character.bola.origin.y then