Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed internal scene placement to use specific indexes #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions scenemanager.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
--[[
SceneManager v1.0.4
SceneManager v1.0.5

changelog:
----------
v1.0.5 - 30.08.2017
Changed internal scene placement to use specific indexes. This allows
us to add always-on-top children to our scenemanager object by just
using addChild.

v1.0.4 - 08.04.2012
Added option to filter a list of events during transitions
Expand Down Expand Up @@ -272,7 +276,7 @@ function SceneManager:changeScene(scene, duration, transition, ease, options)

if self.scene1 == nil then
self.scene1 = self.scenes[scene].new(options and options.userData)
self:addChild(self.scene1)
self:addChildAt(self.scene1, 1)
dispatchEvent(self, "transitionBegin")
dispatchEvent(self.scene1, "enterBegin")
dispatchEvent(self, "transitionEnd")
Expand All @@ -286,7 +290,7 @@ function SceneManager:changeScene(scene, duration, transition, ease, options)

self.scene2 = self.scenes[scene].new(options and options.userData)
self.scene2:setVisible(false)
self:addChild(self.scene2)
self:addChildAt(self.scene2, 2)

self.time = 0
self.currentTimer = os.timer()
Expand Down