fixes
This commit is contained in:
parent
57fa26dfb7
commit
101ba11709
2 changed files with 4 additions and 3 deletions
|
@ -25,10 +25,11 @@ return function(headerheight, fishsprite, headerbuttons, sheets, balance)
|
|||
if btn then
|
||||
if btn.open then
|
||||
-- sprite inside
|
||||
if btn.sprite == 'guppy' then
|
||||
local sheet = fishsprite('medium', false, 'swim')
|
||||
if btn.sprite == 'guppy' or btn.sprite == 'carnivore' then
|
||||
local sheet = fishsprite(btn.sprite == 'carnivore' and 'carnivore' or 'medium', false, 'swim')
|
||||
local frame = math.floor((love.timer.getTime() * 2) % 1 * #sheet.quads) + 1
|
||||
local scale = (sprites['header/buttonbg']:getWidth() / sheet.width) * 0.9
|
||||
if btn.sprite == 'carnivore' then scale = scale * 0.7 end
|
||||
local offset = (sprites['header/buttonbg']:getWidth() * size) / 2
|
||||
love.graphics.draw(sheet.spriteSheet, sheet.quads[frame], x * size + offset, y * size + offset*0.75, 0, size * scale, size * scale, sheet.width/2, sheet.width/2)
|
||||
elseif btn.sprite == 'food' then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue