Thanks. That's certainly one solution. I'm wondering if that can even be done in an event handler. I wish there was something more straightforward in the api for this.
I am developing an application right now and implemented z-axis like @petec said. My application is running in 2 languages. In the stage there is a back button hidden(removed from stage). When the user is selecting the language i am adding the back button and removing language buttons and vice verse for the language buttons. In the event handler's of the buttons i am calling below functions.
And by the help of the timer.delayedcall property my objects are not created before scene transition.(fading out main menu and fading in new activity)
I haven't tried this yet but I want to try and implement a proper depth sorting function so I can do some 2.5D effects (think old skool vectaballs demos).
Providing all the "heavy lifting" (ie creating the sprites etc) has already been done then I suspect just adding and removing children to a list should be fairly efficient.
Hmm - time to have a play I think!
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
There you go hijacking threads again - just for your own evil purposes! (yes boss, coffee coming right up boss...)
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
May be this is good, but it doesn't fit to objects that you should drag yourself. I'm trying to make puzzles, but there is a problem with sprites levels. When i drag tile that should be placed, it should be on top. Does anybody knows how to do this?
@unlying I think that is exactly that kind of solution, each time you start dragging an object, on mouse down or touch start, simply remove it from parent and add again, and it will be on top.
Comments
My application is running in 2 languages. In the stage there is a back button hidden(removed from stage). When the user is selecting the language i am adding the back button and removing language buttons and vice verse for the language buttons.
In the event handler's of the buttons i am calling below functions.
And by the help of the timer.delayedcall property my objects are not created before scene transition.(fading out main menu and fading in new activity)
EX:
btnTr:addEventListener("click",
function()
stage:removeChild(btnEn)
stage:removeChild(btnTrk)
sceneManager:changeScene("scene2", 1, SceneManager.crossfade, easing.linear)
Timer.delayedCall(1000, turkce, data)
end)
btnBack:addEventListener("click",
function()
stage:removeChild(btnBack)
sceneManager:changeScene("scene1", 1, SceneManager.crossfade, easing.linear)
Timer.delayedCall(1000, back, data)
end)
function ingilizce()
stage:addChild(btnBack)
end
function turkce()
stage:addChild(btnBack)
end
function back()
stage:addChild(btnEn)
stage:addChild(btnTr)
end
Likes: dcharno
Providing all the "heavy lifting" (ie creating the sprites etc) has already been done then I suspect just adding and removing children to a list should be fairly efficient.
Hmm - time to have a play I think!
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
(yes boss, coffee coming right up boss...)
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
I'm trying to make puzzles, but there is a problem with sprites levels. When i drag tile that should be placed, it should be on top. Does anybody knows how to do this?
Likes: unlying
Sorry for my doubts!
Likes: unlying, atilim, Teranth, bali001
self:getParent():addChild(self)
As its in the sprites internal controls.....
---------------------------------------
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive