This commit is contained in:
jill 2021-01-23 22:42:56 +03:00
parent f61d3383d4
commit 74bf2a7045
Signed by: oat
GPG key ID: DD83A9617A252385
10 changed files with 118 additions and 18 deletions

View file

@ -8,6 +8,7 @@ function self.fish(x, y)
y = y,
size = 0, -- 0 for small, 1 for medium, 2 for big, 3 for king
eattimer = 0 + math.random() * 2, -- starts out hungry, with a 2s delay
moneytimer = 10 + math.random() * 5, -- min 10s before it can make money
dead = false,
lifetime = 0,
@ -58,4 +59,19 @@ function self.food(x, y, type)
return food
end
function self.money(x, y, type)
local money = {
x = x,
y = y,
speed = 0.2,
time = math.random(),
deathtimer = 0,
collected = false,
collecttimer = 0,
type = type
}
return money
end
return self