1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace KairoEngine.Core
- {
- public class TransitionEvents
- {
- public static event System.Action<float> OnFadeIn;
- public static event System.Action<float> OnFadeOut;
- public static event System.Action<SceneChangeData, float> OnChangeScene;
- public static event System.Action OnTransitionFinish;
- public static event System.Action<string> OnSceneStart;
- public static event System.Action OnGetLocationName;
- public static event System.Action<string> OnLocationName;
- public static void FadeIn(float time)
- {
- if(OnFadeIn != null)
- {
- OnFadeIn(time);
- }
- }
- public static void FadeOut(float time)
- {
- if(OnFadeOut != null)
- {
- OnFadeOut(time);
- }
- }
-
- public static void ChangeScene(SceneChangeData sceneChangeData, float time)
- {
- if(OnChangeScene != null)
- {
- OnChangeScene(sceneChangeData, time);
- }
- }
- public static void TransitionFinish()
- {
- if(OnTransitionFinish != null)
- {
- OnTransitionFinish();
- }
- }
- public static void SceneStart(string link)
- {
- if(OnSceneStart != null)
- {
- OnSceneStart(link);
- }
- }
- public static void GetLocationName()
- {
- if(OnGetLocationName != null)
- {
- OnGetLocationName();
- }
- }
- public static void SendLocationName(string locationName)
- {
- if(OnLocationName != null)
- {
- OnLocationName(locationName);
- }
- }
- }
- }
|