2020-01-26 12:28:53 +01:00
|
|
|
local cwd = (...):gsub('%.ring$', '') .. "."
|
|
|
|
local Collectible = require(cwd .. "collectible")
|
|
|
|
local Ring = Collectible:extend()
|
|
|
|
|
|
|
|
function Ring:new(world, x, y, z)
|
|
|
|
Ring.super.new(self, world, x, y, z+6, 16, 10, 16)
|
|
|
|
self:setSprite("ring", 0, 0)
|
|
|
|
end
|
|
|
|
|
|
|
|
function Ring:getPicked(player)
|
2020-04-25 12:15:12 +02:00
|
|
|
player:setRing(1, true)
|
|
|
|
player:setScore(10, true)
|
2020-01-26 12:28:53 +01:00
|
|
|
|
|
|
|
self:destroy()
|
|
|
|
end
|
|
|
|
|
|
|
|
return Ring
|