コード例 #1
0
	public override void AssetLoadingGameProgressEventHandler(AssetLoadingGameProgressEvent data)
	{
		base.AssetLoadingGameProgressEventHandler(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 = "MainGameScene"
			});
	}
コード例 #2
0
 /// <summary>
 // This method is executed when using this.Publish(new AssetLoadingGameProgressEvent())
 /// </summary>
 public virtual void AssetLoadingGameProgressEventHandler(AssetLoadingGameProgressEvent data) {
     // Process the commands information.  Also, you can publish new events by using the line below.
     // this.Publish(new AnotherEvent())
 }