pleins de trucs
This commit is contained in:
17
scripts/world/events/tool.lua
Normal file
17
scripts/world/events/tool.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
||||
Reference in New Issue
Block a user