fix: remove some call to non-existing variables
This commit is contained in:
parent
0114927ac0
commit
877de98f67
10 changed files with 12 additions and 12 deletions
|
@ -189,7 +189,7 @@ function BaseWorld:registerBody(body)
|
|||
end
|
||||
|
||||
function BaseWorld:updateBody(body)
|
||||
return x, y, {}, 0
|
||||
return self.x, self.y, {}, 0
|
||||
end
|
||||
|
||||
function BaseWorld:removeBody(body)
|
||||
|
@ -239,7 +239,7 @@ function BaseWorld:addPlayer(x, y, z, id)
|
|||
local player = {}
|
||||
if id <= self.playerNumber then
|
||||
player.actor = self:newPlayer(x, y, z)
|
||||
player.sourceid = sourceid or 1
|
||||
player.sourceid = id or 1
|
||||
|
||||
table.insert(self.players, player)
|
||||
|
||||
|
|
|
@ -83,7 +83,6 @@ function Graphics.box(x, y, w, h)
|
|||
local y = math.floor(y)
|
||||
local w = math.floor(w)
|
||||
local h = math.floor(h)
|
||||
local a = a or 1
|
||||
|
||||
local r, g, b, a = love.graphics.getColor( )
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ function Math.numberToString(x, length)
|
|||
local string = ""
|
||||
local x = x
|
||||
if (x >= math.pow(10, length)) then
|
||||
x = unitsNumber*10 - 1
|
||||
x = length*10 - 1
|
||||
string = string .. x
|
||||
else
|
||||
for i=1, (length-1) do
|
||||
|
|
|
@ -27,7 +27,7 @@ function ParallaxBackground:new(scene, height, bottomBorder, type)
|
|||
self.assets:addImage("cliff", backpath .. "-cliff.png")
|
||||
|
||||
self.texture = {}
|
||||
self.texture.floor = self:generateFloor(tile)
|
||||
self.texture.floor = self:generateFloor(datas.tiles)
|
||||
end
|
||||
|
||||
-- GET FUNCTIONS
|
||||
|
|
|
@ -54,6 +54,7 @@ function gui.newChoiceBack(approximateWidth)
|
|||
|
||||
local iterations = math.floor((approximateWidth / 12) - 4)
|
||||
local width = (iterations * 12)
|
||||
local height = 16
|
||||
local canvasWidth = width + 21 + 25
|
||||
|
||||
local canvas = love.graphics.newCanvas(canvasWidth, height)
|
||||
|
|
|
@ -27,7 +27,7 @@ function ShootMap:updateWidth()
|
|||
end
|
||||
|
||||
function ShootMap:getLevelData(mapname)
|
||||
local file = file or "testlevel.test1"
|
||||
local file = mapname or "testlevel.test1"
|
||||
local level = require("datas.gamedata.maps.shoot." .. file)
|
||||
|
||||
self.zone = level.datas.zone
|
||||
|
|
|
@ -18,7 +18,7 @@ function BattleUtils.getCategoryDirectory(directory, lua)
|
|||
end
|
||||
|
||||
function BattleUtils.getDirectoryLuaStyle(directory)
|
||||
return REQUIREDIR .. "." .. directory
|
||||
return DIR .. "." .. directory
|
||||
end
|
||||
|
||||
function BattleUtils.getBattleFromCategory(directory)
|
||||
|
|
|
@ -178,7 +178,7 @@ end
|
|||
|
||||
function Battler:setJump(power, bounceNumber, useDefaultAnimation)
|
||||
self.zspeed = power
|
||||
self.jump.spin = spinjump
|
||||
self.jump.spin = (useDefaultAnimation == false)
|
||||
self.jump.bounceNumber = bounceNumber
|
||||
self.jump.isJumping = true
|
||||
end
|
||||
|
|
|
@ -60,10 +60,10 @@ function FighterParent:sendDamage(target, value, accuracy, isSpecial, isAerial)
|
|||
|
||||
core.debug:print("cbs/battler", "Sending " .. value .." damage at " .. target.name)
|
||||
|
||||
target:receiveDamage(value, accuracy, isSpecial, isAerial, fromWho)
|
||||
target:receiveDamage(value, accuracy, isSpecial, isAerial, self)
|
||||
end
|
||||
|
||||
function FighterParent:receiveDamage(value, accuracy, isSpecial, isAerial)
|
||||
function FighterParent:receiveDamage(value, accuracy, isSpecial, isAerial, fromWho)
|
||||
local stats = self:getStats()
|
||||
|
||||
if (isSpecial) then
|
||||
|
@ -127,7 +127,7 @@ end
|
|||
|
||||
function FighterParent:getUniqueIdentificator()
|
||||
local side = 1
|
||||
if (isHero == false) then
|
||||
if (self.isHero == false) then
|
||||
side = -1
|
||||
end
|
||||
return self.id * side
|
||||
|
|
|
@ -81,7 +81,7 @@ function widgets.Switch:new(scene, menu, keyname, label)
|
|||
self.keyname = keyname
|
||||
local label2 = self:getLabel()
|
||||
widgets.Switch.super.new(self, scene, menu, label, label2)
|
||||
self.order = order or 0
|
||||
self.order = 0
|
||||
end
|
||||
|
||||
function widgets.Switch:modifyKey()
|
||||
|
|
Loading…
Reference in a new issue