70ed18202d
It'll give us the following features - Support for autorun in shoot-style maps - Pause menu in subgames - Chunk in shoot maps - Rings
17 lines
375 B
Lua
17 lines
375 B
Lua
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)
|
|
player:setRing(1, true)
|
|
player:setScore(10, true)
|
|
|
|
self:destroy()
|
|
end
|
|
|
|
return Ring
|