fix: make emblem and icon character-dependent
This commit is contained in:
parent
e05b04357d
commit
242e90c803
3 changed files with 10 additions and 3 deletions
|
@ -12,4 +12,8 @@ return {
|
||||||
isUnlockedAtStart = true,
|
isUnlockedAtStart = true,
|
||||||
canGoSuper = true,
|
canGoSuper = true,
|
||||||
canBreakCraft = false,
|
canBreakCraft = false,
|
||||||
|
|
||||||
|
icon = 1,
|
||||||
|
charset = "perso",
|
||||||
|
charId = 1,
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,7 +144,7 @@ end
|
||||||
|
|
||||||
-- DRAW FUNCTIONS
|
-- DRAW FUNCTIONS
|
||||||
function HeroFighter:drawIcon(x, y)
|
function HeroFighter:drawIcon(x, y)
|
||||||
local iconID = 1
|
local iconID = self.abstract.data.icon
|
||||||
self.assets.tileset["charicons"]:drawTile(iconID, x, y)
|
self.assets.tileset["charicons"]:drawTile(iconID, x, y)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -34,11 +34,14 @@ function StatusBar:updatePP()
|
||||||
end
|
end
|
||||||
|
|
||||||
function StatusBar:drawEmblem(x, y)
|
function StatusBar:drawEmblem(x, y)
|
||||||
self.assets.images["e_speedster"]:draw(x, y)
|
local emblem1 = "e_" .. self.abstract.data.class
|
||||||
|
local emblem2 = "m_" .. self.abstract.data.class
|
||||||
|
|
||||||
|
self.assets.images[emblem1]:draw(x, y)
|
||||||
core.screen:setScissor(x, y-16, 32, 40)
|
core.screen:setScissor(x, y-16, 32, 40)
|
||||||
self.assets.sprites[self.charid]:drawAnimation(x+14, y+14)
|
self.assets.sprites[self.charid]:drawAnimation(x+14, y+14)
|
||||||
core.screen:resetScissor( )
|
core.screen:resetScissor( )
|
||||||
self.assets.images["m_speedster"]:draw(x, y)
|
self.assets.images[emblem2]:draw(x, y)
|
||||||
end
|
end
|
||||||
|
|
||||||
function StatusBar:draw()
|
function StatusBar:draw()
|
||||||
|
|
Loading…
Reference in a new issue