Difference between revisions of "SceneManager enterBegin"
From GiderosMobile
(Created page with "'''<translate>Available since</translate>:''' Gideros 2020.2<br/> '''<translate>Value</translate>:''' "enterBegin"<br/> '''<translate>Defined by</translate>:''' SceneManager...") |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
(One intermediate revision by the same user not shown) | |||
Line 8: | Line 8: | ||
=== Example === | === Example === | ||
'''enterBegin''' | '''enterBegin''' | ||
− | < | + | <syntaxhighlight lang="lua"> |
Level01 = Core.class(Sprite) | Level01 = Core.class(Sprite) | ||
Line 38: | Line 38: | ||
function Level01:onTransitionOutEnd() | function Level01:onTransitionOutEnd() | ||
end | end | ||
− | </ | + | </syntaxhighlight> |
=== Event properties === | === Event properties === | ||
{{SceneManager}} | {{SceneManager}} |
Latest revision as of 14:32, 13 July 2023
Available since: Gideros 2020.2
Value: "enterBegin"
Defined by: SceneManager
Description
This event is dispatched on Transition In Begin.
Example
enterBegin
Level01 = Core.class(Sprite)
function Level01:init()
-- LISTENERS
self:addEventListener("enterBegin", self.onTransitionInBegin, self)
self:addEventListener("enterEnd", self.onTransitionInEnd, self)
self:addEventListener("exitBegin", self.onTransitionOutBegin, self)
self:addEventListener("exitEnd", self.onTransitionOutEnd, self)
end
-- GAME LOOP
function Level01:onEnterFrame(e)
end
-- EVENT LISTENERS
function Level01:onTransitionInBegin()
self:addEventListener(Event.ENTER_FRAME, self.onEnterFrame, self)
end
function Level01:onTransitionInEnd()
self:myKeysPressed()
end
function Level01:onTransitionOutBegin()
self:removeEventListener(Event.ENTER_FRAME, self.onEnterFrame, self)
end
function Level01:onTransitionOutEnd()
end
Event properties