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,
|
||||
canGoSuper = true,
|
||||
canBreakCraft = false,
|
||||
|
||||
icon = 1,
|
||||
charset = "perso",
|
||||
charId = 1,
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ end
|
|||
|
||||
-- DRAW FUNCTIONS
|
||||
function HeroFighter:drawIcon(x, y)
|
||||
local iconID = 1
|
||||
local iconID = self.abstract.data.icon
|
||||
self.assets.tileset["charicons"]:drawTile(iconID, x, y)
|
||||
end
|
||||
|
||||
|
|
|
@ -34,11 +34,14 @@ function StatusBar:updatePP()
|
|||
end
|
||||
|
||||
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)
|
||||
self.assets.sprites[self.charid]:drawAnimation(x+14, y+14)
|
||||
core.screen:resetScissor( )
|
||||
self.assets.images["m_speedster"]:draw(x, y)
|
||||
self.assets.images[emblem2]:draw(x, y)
|
||||
end
|
||||
|
||||
function StatusBar:draw()
|
||||
|
|
Loading…
Reference in a new issue