carnivore

This commit is contained in:
jill 2021-01-25 17:48:31 +03:00
parent 3b70bf9b5d
commit 57fa26dfb7
Signed by: oat
GPG key ID: DD83A9617A252385
14 changed files with 106 additions and 28 deletions

View file

@ -57,6 +57,8 @@ return function(feesh, spritescale, fishsprite)
size = 'big'
elseif n.size == 3 then
size = 'king'
elseif n.size == 4 then
size = 'carnivore'
end
local sheet = fishsprite(size, false, anim)

View file

@ -1,7 +1,11 @@
local moneysheets = {
'coin1', 'coin2', 'star', 'diamond', 'chest'
}
return function(money, sheets, spritescale)
local sw, sh = love.graphics.getDimensions()
for _,f in ipairs(money) do
local sheet = sheets['money' .. (f.type)]
local sheet = sheets[moneysheets[f.type]]
local x = mix(f.x * sw, sw / 9 * 8, ease.outCubic(f.collecttimer))
local y = mix(f.y * sh, HEADER_HEIGHT - 20, ease.outCubic(f.collecttimer))
local frame = math.floor((f.time%1) * #sheet.quads) + 1