SceneTransition is used to transition from one Scene to another or within a scene with an effect. If sceneLoadAction is null Nez will perform an in-Scene transition as opposed to loading a new Scene mid transition. The general gist of a transition is the following: - onBeginTransition will be called allowing you to yield for multipart transitions - for two part transitions with Effects you can yield on a call to tickEffectProgressProperty for part one to obscure the screen - next, yield a call to loadNextScene to load up the new Scene - finally, yield again on tickEffectProgressProperty to un-obscure the screen and show the new Scene
Example #1
0
 /// <summary>
 /// temporarily runs SceneTransition allowing one Scene to transition to another smoothly with custom effects.
 /// </summary>
 /// <param name="sceneTransition">Scene transition.</param>
 public static SceneTransition startSceneTransition(SceneTransition sceneTransition)
 {
     Assert.isNull(_instance._sceneTransition, "You cannot start a new SceneTransition until the previous one has completed");
     _instance._sceneTransition = sceneTransition;
     return(sceneTransition);
 }
Example #2
0
File: Core.cs Project: RastaCow/Nez
 /// <summary>
 /// temporarily runs SceneTransition allowing one Scene to transition to another smoothly with custom effects.
 /// </summary>
 /// <param name="sceneTransition">Scene transition.</param>
 public static void startSceneTransition( SceneTransition sceneTransition )
 {
     Assert.isNull( _instance._sceneTransition, "You cannot start a new SceneTransition until the previous one has completed" );
     _instance._sceneTransition = sceneTransition;
 }