From 101ba11709441b0ac44efb7c0210c92851ff9079 Mon Sep 17 00:00:00 2001 From: jill Date: Mon, 25 Jan 2021 17:57:53 +0300 Subject: [PATCH] fixes --- scenes/gameplay/draw/header.lua | 5 +++-- scenes/gameplay/main.lua | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scenes/gameplay/draw/header.lua b/scenes/gameplay/draw/header.lua index 0f9dea1..8449f86 100644 --- a/scenes/gameplay/draw/header.lua +++ b/scenes/gameplay/draw/header.lua @@ -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 diff --git a/scenes/gameplay/main.lua b/scenes/gameplay/main.lua index e54f6f6..5609f16 100644 --- a/scenes/gameplay/main.lua +++ b/scenes/gameplay/main.lua @@ -192,7 +192,7 @@ function self.mousepressed(x, y, b) end if b == 1 and y > HEADER_HEIGHT and #food < foodcount then - if balance >= 5 then + if balance >= 5 or debug then table.insert(food, constr.food(x/love.graphics.getWidth(), y/love.graphics.getHeight(), foodtier)) playSound('dropfood') balance = balance - 5