17 lines
388 B
Lua
17 lines
388 B
Lua
local ToolEvent, super = Class(Event, "tool")
|
|
function ToolEvent:init(data)
|
|
super.init(self, data.x, data.y, 64, 64, data)
|
|
end
|
|
|
|
function ToolEvent:draw()
|
|
super.draw(self)
|
|
love.graphics.draw(Assets.getTexture("tool"), 0, 0, 0, 3, 3)
|
|
end
|
|
|
|
function ToolEvent:onInteract(player, dir)
|
|
super.onInteract(self, player, dir)
|
|
Game.world:openMenu(ToolMenu)
|
|
|
|
end
|
|
|
|
return ToolEvent |