sonic-bluestreak/sonic-bluestreak.love/scenes/overworld/actors/loot/ringbox.lua
2021-11-25 10:57:13 +01:00

28 lines
No EOL
741 B
Lua

local Gizmo = require "scenes.overworld.actors.gizmo"
local RingBox = Gizmo:extend()
local overrides = {
["isSolid"] = true,
["charset"] = "item1",
["charId"] = 1,
["charDir"] = "down",
["destroy"] = "forever",
["needButton"] = true,
["interactionName"] = "Take",
}
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"},
{"showGFX", "", self.x + 16, self.y + 14, "smallsmoke"}
}
end
return RingBox