sonic-radiance/sonic-radiance.love/game/events/event/teleport.lua

20 lines
596 B
Lua
Raw Normal View History

2021-04-03 00:04:22 +02:00
local StepParent = require "game.events.event.parent"
local SimpleMessageStep = StepParent:extend()
local defTransitions = require "core.modules.transitions"
function SimpleMessageStep:new(controller, args)
SimpleMessageStep.super.new(self, controller, args)
end
function SimpleMessageStep:start()
core.screen:startTransition(defTransitions.default, defTransitions.default,
function() self.events.scene.world:teleport(self.arguments.area, self.arguments.x, self.arguments.y) end,
0, 0)
end
function SimpleMessageStep:update(dt)
self:finish()
end
return SimpleMessageStep;