sonic-radiance/sonic-radiance.love/scenes/overworld/actors/loot/ringbox.lua
2021-04-21 21:14:45 +02:00

28 lines
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