refactor(levels): use right variable names for the addScore/addGold
This commit is contained in:
parent
4f0f6a2ea8
commit
e16d36f301
|
@ -21,7 +21,7 @@ function Block:breakBlock(player)
|
|||
self.obj.Debris(self.world, x-dist, y-dist, spd, 180-45)
|
||||
self.obj.GFX(self.world, self.x+8, self.y+8, "poof", 1)
|
||||
self.scene.assets:playSFX("break")
|
||||
player:getScore(10)
|
||||
player:addScore(10)
|
||||
self:destroy()
|
||||
end
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ function Ennemy:getDamage(base_damage, player)
|
|||
if (self.hp == 0) then
|
||||
self:destroy()
|
||||
self.obj.GFX(self.world, self.x+8, self.y+8, "poof", 1)
|
||||
player:getScore(100)
|
||||
player:addScore(100)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ end
|
|||
function Coin:takeLoot(player)
|
||||
self.obj.GFX(self.world, self.x+8, self.y+8, "sparkle", 1)
|
||||
self:destroy()
|
||||
player:getGold(self.value)
|
||||
player:getScore(10)
|
||||
player:addGold(self.value)
|
||||
player:addScore(10)
|
||||
self.scene.assets:playSFX("collectcoin")
|
||||
end
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ end
|
|||
function Loot:takeLoot()
|
||||
self.obj.GFX(self.world, self.x+8, self.y+8, "sparkle", 1)
|
||||
self:destroy()
|
||||
player:getGold(1)
|
||||
player:getScore(10)
|
||||
player:addGold(1)
|
||||
player:addScore(10)
|
||||
self.scene.assets:playSFX("collectcoin")
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue