コード例 #1
0
	/// <summary>
	/// Called when a scene finishes playing its intro flow.
	/// </summary>
	/// <param name='scene'>
	/// The scene.
	/// </param>
	public void OnSceneIntroFinished(SceneBlock scene)
	{
		Debug.Log("Scene INTRO: " + scene.name);
		
		// If this is the current scene because the previous scene was destroyed, start the idle flow
		if (loadedScenes[0] == scene) {
			// We go from intro to outro automatically
			AdvanceFlow();
			
			// Preload the next scene
			if (loadedScenes[0].preloadNextScene) {
				LoadScene(loadedScenes[0].nextScene);
			}
		}
	}
コード例 #2
0
	/// <summary>
	/// Called when a scene finishes playing its outro flow.
	/// </summary>
	/// <param name='scene'>
	/// The scene.
	/// </param>
	public void OnSceneOutroFinished(SceneBlock scene)
	{
		Debug.Log("Scene OUTRO: " + scene.name);
		DestroyScene(scene);
		
		// If the outro flow finished after the intro flow of the next scene, start the idle flow of the next scene
		if (loadedScenes.Count < 1 || !loadedScenes[0].IsPlaying()) {
			AdvanceFlow();
			
			// Preload the next scene
			if (loadedScenes[0].preloadNextScene) {
				LoadScene(loadedScenes[0].nextScene);
			}
		}
	}
コード例 #3
0
	/// <summary>
	/// Destroys the scene.
	/// </summary>
	/// <param name='scene'>
	/// Scene.
	/// </param>
	protected void DestroyScene(SceneBlock scene)
	{
		loadedScenes.Remove(scene);
		Destroy(scene.gameObject);
	}
コード例 #4
0
	/// <summary>
	/// Called when a scene finishes playing its idle flow.
	/// </summary>
	/// <param name='scene'>
	/// The scene.
	/// </param>
	public void OnSceneIdleFinished(SceneBlock scene)
	{
		Debug.Log("Scene IDLE: " + scene.name);
		
		if (GenericSettings.Instance.Autoplay) {
			AdvanceFlow();
		}
	}