sonic-radiance/sonic-radiance.love/scenes/overworld/actors/ringbox.lua
2021-03-22 21:15:33 +01:00

27 lines
673 B
Lua

local cwd = (...):gsub('%.ringbox$', '') .. "."
local Gizmo = require(cwd .. "gizmo")
local RingBox = Gizmo:extend()
local overrides = {
["isSolid"] = true,
["charset"] = "item1",
["charId"] = 1,
["charDir"] = "down",
["destroy"] = "temp",
["needButton"] = true,
}
function RingBox:new(world, x, y)
RingBox.super.new(self, world, x, y, 16, 16, overrides)
end
function RingBox:applyProperties()
RingBox.super.applyProperties(self)
self.event = {
{"getRings", "", self.properties.number},
{"playSFX", "", "pop"},
{"simpleMessage", "", "You got " .. self.properties.number .. " rings"},
}
end
return RingBox