fix: make emblem and icon character-dependent

This commit is contained in:
Kazhnuz 2020-08-02 16:43:15 +02:00
parent e05b04357d
commit 242e90c803
3 changed files with 10 additions and 3 deletions

View file

@ -12,4 +12,8 @@ return {
isUnlockedAtStart = true,
canGoSuper = true,
canBreakCraft = false,
icon = 1,
charset = "perso",
charId = 1,
}

View file

@ -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

View file

@ -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()