2021-04-10 14:43:30 +02:00
|
|
|
local Gizmo = require "scenes.overworld.actors.gizmo"
|
2021-04-03 00:04:22 +02:00
|
|
|
local Teleporter = Gizmo:extend()
|
|
|
|
|
|
|
|
function Teleporter:new(world, x, y, w, h)
|
|
|
|
Teleporter.super.new(self, world, x, y, w, h, nil)
|
2021-04-21 18:36:20 +02:00
|
|
|
self.interactionName = "Enter"
|
2021-04-03 00:04:22 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function Teleporter:applyProperties()
|
|
|
|
Teleporter.super.applyProperties(self)
|
2021-04-21 18:46:30 +02:00
|
|
|
local charDir = self.properties.charDir or "default"
|
2021-04-03 00:04:22 +02:00
|
|
|
self.event = {
|
2021-04-21 18:46:30 +02:00
|
|
|
{"teleport", "", self.properties.area, self.properties.x, self.properties.y, charDir},
|
2021-04-03 00:04:22 +02:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
return Teleporter
|