Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Scene transitions not working on scene hide
Started by gogigoranic8 Feb 14 2017 12:47 PM

- - - - -
3 replies to this topic
scene transitions

Best Answer bjsorrentino , 14 February 2017 - 01:32 PM

Hi @gogigoranic8,

Much of the initial issue (scene transitions) will depend on when you call the ".gotoScene()" call within each scene. For example, if you go from "play.lua" to "restart.lua", you should call the second .gotoScene() only after "restart.lua" is fully on screen (show>"did"). If you call it any earlier, it will simply take over control from the previous transition.

 

Best regards,

Brent

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

gogigoranic8

[GLOBAL: userInfoPane.html]
gogigoranic8
  • Contributor

  • 149 posts
  • Corona SDK

Hi guys,

 

I have a small animation problem.

 

I am restarting my game like this:

 

play.lua -> restart.lua -> play.lua

 

 

 

play.lua

composer.gotoScene( "restart", "zoomInOut", 2000 )

restart.lua -- BASICALLY A BLANK BLACK BACKGROUND FILE

composer.gotoScene( "play", "zoomOutIn", 2000 )

My problem is play.lua just disappears in a blink of an eye, and I only get zoomOutIn animation (restart.lua -> play.lua).

 

zoomInOut is never animated/displayed (play.lua -> restart.lua) ...

 

 

 

I read about this topic, and it seems that everyhing has to be in inserted sceneGroup?

 

How to insert everything in sceneGroup (I have a bunch of display groups, a camera system, also something is created in scene:show ...) ?

 

 

 

Many thanks!!  :D


Edited by gogigoranic8, 14 February 2017 - 12:53 PM.


[TOPIC: post.html]
#2

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

  Best Answer

Hi @gogigoranic8,

Much of the initial issue (scene transitions) will depend on when you call the ".gotoScene()" call within each scene. For example, if you go from "play.lua" to "restart.lua", you should call the second .gotoScene() only after "restart.lua" is fully on screen (show>"did"). If you call it any earlier, it will simply take over control from the previous transition.

 

Best regards,

Brent



[TOPIC: post.html]
#3

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

And yes, you MUST insert all objects that are part of a scene into that scene's view group, if you want them to be handled by Composer and transitioned as part of that scene. That's a fundamental usage aspect of Composer. :)

 

Brent



[TOPIC: post.html]
#4

gogigoranic8

[GLOBAL: userInfoPane.html]
gogigoranic8
  • Contributor

  • 149 posts
  • Corona SDK

Amazing reply!

Thanks Brent!

 

Corona rocks baby!!  :D




[topic_controls]
[/topic_controls]