money
This commit is contained in:
parent
f61d3383d4
commit
74bf2a7045
10 changed files with 118 additions and 18 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue