sonic-radiance/sonic-radiance.love/scenes/overworld/actors/itembox.lua
2021-04-10 14:43:30 +02:00

26 lines
No EOL
711 B
Lua

local Gizmo = require "scenes.overworld.actors.gizmo"
local ItemBox = Gizmo:extend()
local overrides = {
["isSolid"] = true,
["charset"] = "item1",
["charId"] = 1,
["charDir"] = "right",
["destroy"] = "forever",
["needButton"] = true,
}
function ItemBox:new(world, x, y)
ItemBox.super.new(self, world, x, y, 16, 16, overrides)
end
function ItemBox:applyProperties()
ItemBox.super.applyProperties(self)
self.event = {
{"getItems", "", self.properties.category, self.properties.item, self.properties.number},
{"playSFX", "", "pop"},
{"simpleMessage", "", "You got " .. self.properties.number .. " " .. self.properties.item},
}
end
return ItemBox