summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-12-15 18:21:11 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-12-15 18:21:11 -0300
commit42049918c9dacfa7f75273aad9b822a8a1a077d1 (patch)
tree47c8ec1ede5f0e81603f3f81e1a0a0b3425a5c52 /src
parentbdf02f96883d4e4802ef387bcb54364c7e7dc03b (diff)
Keep the code KISS 3
Diffstat (limited to 'src')
-rw-r--r--src/gnu_and_bola_brawlers/keypressed/default.lua2
-rw-r--r--src/gnu_and_bola_brawlers/load/character.lua6
-rw-r--r--src/gnu_and_bola_brawlers/load/default.lua2
-rw-r--r--src/gnu_and_bola_brawlers/main.lua14
-rw-r--r--src/gnu_and_bola_brawlers/meta_sprites/bola/jump.lua (renamed from src/gnu_and_bola_brawlers/jump.lua)0
-rw-r--r--src/gnu_and_bola_brawlers/meta_sprites/bola/stand.lua (renamed from src/gnu_and_bola_brawlers/stand.lua)0
-rw-r--r--src/gnu_and_bola_brawlers/meta_sprites/bola/walk.lua (renamed from src/gnu_and_bola_brawlers/walk.lua)0
7 files changed, 12 insertions, 12 deletions
diff --git a/src/gnu_and_bola_brawlers/keypressed/default.lua b/src/gnu_and_bola_brawlers/keypressed/default.lua
index abba1cc..26dea2f 100644
--- a/src/gnu_and_bola_brawlers/keypressed/default.lua
+++ b/src/gnu_and_bola_brawlers/keypressed/default.lua
@@ -9,7 +9,7 @@ keypressed.trigger = function(character, images, metaSprite, controller, key, sc
character.actionA = true
character.actionDown = false
character.actionUp = false
- metaSprite = require 'jump'
+ metaSprite = require 'meta_sprites/bola/jump'
end
if scancode == controller.left then
diff --git a/src/gnu_and_bola_brawlers/load/character.lua b/src/gnu_and_bola_brawlers/load/character.lua
index a582e62..9339a38 100644
--- a/src/gnu_and_bola_brawlers/load/character.lua
+++ b/src/gnu_and_bola_brawlers/load/character.lua
@@ -16,9 +16,9 @@ return {
x = images.bola.x / 2,
y = images.bola.y / 2,
},
- stand = require 'stand',
- walk = require 'walk',
- jump = require 'jump',
+ stand = require 'meta_sprites/bola/stand',
+ walk = require 'meta_sprites/bola/walk',
+ jump = require 'meta_sprites/bola/jump',
actionLeft = false,
actionRight = false,
actionUp = false,
diff --git a/src/gnu_and_bola_brawlers/load/default.lua b/src/gnu_and_bola_brawlers/load/default.lua
index bbf5c02..1874e7d 100644
--- a/src/gnu_and_bola_brawlers/load/default.lua
+++ b/src/gnu_and_bola_brawlers/load/default.lua
@@ -18,7 +18,7 @@ load.initialize = function()
character = require 'load/character'
metaSprite = {
- bola = require 'stand',
+ bola = require 'meta_sprites/bola/stand',
}
end
diff --git a/src/gnu_and_bola_brawlers/main.lua b/src/gnu_and_bola_brawlers/main.lua
index af3952c..ee23e64 100644
--- a/src/gnu_and_bola_brawlers/main.lua
+++ b/src/gnu_and_bola_brawlers/main.lua
@@ -43,35 +43,35 @@ function love.update(dt)
end
if character.actionLeft == true and character.actionRight == false then
- metaSprite = require 'walk'
+ metaSprite = require 'meta_sprites/bola/walk'
character.position.x = character.position.x - (character.velocity * dt)
character.scale.x = -1
end
if character.actionRight == true and character.actionLeft == false then
- metaSprite = require 'walk'
+ metaSprite = require 'meta_sprites/bola/walk'
character.position.x = character.position.x + (character.velocity * dt)
character.scale.x = 1
end
if character.actionUp == true and character.actionDown == false then
- metaSprite = require 'walk'
+ metaSprite = require 'meta_sprites/bola/walk'
character.position.y = character.position.y - (character.velocity * dt)
character.jump.ground = character.position.y
end
if character.actionDown == true and character.actionUp == false then
- metaSprite = require 'walk'
+ metaSprite = require 'meta_sprites/bola/walk'
character.position.y = character.position.y + (character.velocity * dt)
character.jump.ground = character.position.y
end
if character.actionUp == true and character.actionDown == true then
- metaSprite = require 'stand'
+ metaSprite = require 'meta_sprites/bola/stand'
elseif character.actionLeft == true and character.actionRight == true then
- metaSprite = require 'stand'
+ metaSprite = require 'meta_sprites/bola/stand'
elseif character.actionLeft == false and character.actionRight == false and character.actionUp == false and character.actionDown == false then
- metaSprite = require 'stand'
+ metaSprite = require 'meta_sprites/bola/stand'
end
return metaSprite
diff --git a/src/gnu_and_bola_brawlers/jump.lua b/src/gnu_and_bola_brawlers/meta_sprites/bola/jump.lua
index ad98578..ad98578 100644
--- a/src/gnu_and_bola_brawlers/jump.lua
+++ b/src/gnu_and_bola_brawlers/meta_sprites/bola/jump.lua
diff --git a/src/gnu_and_bola_brawlers/stand.lua b/src/gnu_and_bola_brawlers/meta_sprites/bola/stand.lua
index 1c21792..1c21792 100644
--- a/src/gnu_and_bola_brawlers/stand.lua
+++ b/src/gnu_and_bola_brawlers/meta_sprites/bola/stand.lua
diff --git a/src/gnu_and_bola_brawlers/walk.lua b/src/gnu_and_bola_brawlers/meta_sprites/bola/walk.lua
index 36f42e3..36f42e3 100644
--- a/src/gnu_and_bola_brawlers/walk.lua
+++ b/src/gnu_and_bola_brawlers/meta_sprites/bola/walk.lua