23 lines
546 B
Lua
23 lines
546 B
Lua
Lettuce = {}
|
|
|
|
local sizeX, sizeY = LettuceSprite:getSize()
|
|
local size = { x = sizeX, y = sizeY / 2 }
|
|
local expireWhenOffScreenBy = { x = 2000, y = 480 }
|
|
|
|
local canBounce = {
|
|
flat = { x = 22, y = 190 },
|
|
mult = { x = 1, y = -0.5 },
|
|
}
|
|
|
|
function Lettuce.initialize(o, x, y)
|
|
o.score = 1
|
|
o.expireAfterCollision = true
|
|
o.size = size
|
|
o.position = { x = x, y = y }
|
|
o.drawAsSprite = LettuceSprite
|
|
o.expireWhenOffScreenBy = expireWhenOffScreenBy
|
|
o.canBounce = canBounce
|
|
newestBooster = o
|
|
return newestBooster
|
|
end
|