예제 #1
0
        /*
         * We handle this event to get the moment, when asset loading is finished, so we can move to
         * Main Menu scene
         */
        public override void AssetLoadingProgressEventHandler(AssetLoadingProgressEvent data)
        {
            base.AssetLoadingProgressEventHandler(data);

            if (data.Progress != 1f) return; //This is the key part: we check that asset loading procedure is finished

            this.Publish(new UnloadSceneCommand() //Unload AssetsLoadingScene
            {
                SceneName = "AssetsLoadingScene"
            });

            this.Publish(new LoadSceneCommand() // Load MainMenuScene
            {
                SceneName = "MainMenuScene"
            });
        }
예제 #2
0
        /*
         * We handle this event to get the moment, when asset loading is finished, so we can move to
         * Main Menu scene
         */

        public override void AssetLoadingProgressEventHandler(AssetLoadingProgressEvent data)
        {
            base.AssetLoadingProgressEventHandler(data);

            if (data.Progress != 1f)
            {
                return;                           //This is the key part: we check that asset loading procedure is finished
            }
            this.Publish(new UnloadSceneCommand() //Unload AssetsLoadingScene
            {
                SceneName = "AssetsLoadingScene"
            });

            this.Publish(new LoadSceneCommand() // Load MainMenuScene
            {
                SceneName = "MainMenuScene"
            });
        }
예제 #3
0
        /// <sumarry>
        // This method is executed when using this.Publish(new AssetLoadingProgressEvent())
        /// </sumarry>
        public override void AssetLoadingProgressEventHandler(AssetLoadingProgressEvent data)
        {
            base.AssetLoadingProgressEventHandler(data);
            // Process the commands information. Also, you can publish new events by using the line below.
            // this.Publish(new AnotherEvent())

            Debug.Log("--- AssetLoadingProgressEventHandler ---");

            if (data.Progress != 1f)
            {
                return;                           //This is the key part: we check that asset loading procedure is finished
            }
            this.Publish(new UnloadSceneCommand() //Unload AssetsLoadingScene
            {
                SceneName = "AssetsLoadingScene"
            });

            this.Publish(new LoadSceneCommand() // Load MainMenuScene
            {
                SceneName = "MainMenuScene"
            });
        }
 /// <summary>
 // This method is executed when using this.Publish(new AssetLoadingProgressEvent())
 /// </summary>
 public virtual void AssetLoadingProgressEventHandler(AssetLoadingProgressEvent data) {
     // Process the commands information.  Also, you can publish new events by using the line below.
     // this.Publish(new AnotherEvent())
 }
예제 #5
0
 /// <summary>
 // This method is executed when using this.Publish(new AssetLoadingProgressEvent())
 /// </summary>
 public virtual void AssetLoadingProgressEventHandler(AssetLoadingProgressEvent data)
 {
     // Process the commands information.  Also, you can publish new events by using the line below.
     // this.Publish(new AnotherEvent())
 }
예제 #6
0
 public virtual void AssetLoadingProgressEventHandler(AssetLoadingProgressEvent data)
 {
 }