sonic-radiance/sonic-radiance.love/scenes/overworld/actors/loot/ringbox.lua

28 lines
741 B
Lua
Raw Permalink Normal View History

2021-04-10 14:43:30 +02:00
local Gizmo = require "scenes.overworld.actors.gizmo"
2021-03-22 21:15:33 +01:00
local RingBox = Gizmo:extend()
local overrides = {
["isSolid"] = true,
["charset"] = "item1",
["charId"] = 1,
["charDir"] = "down",
["destroy"] = "forever",
2021-03-22 21:15:33 +01:00
["needButton"] = true,
["interactionName"] = "Take",
2021-03-22 21:15:33 +01:00
}
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"}
2021-03-22 21:15:33 +01:00
}
end
return RingBox