Пример #1
0
 public static void ChangeState(bool opaque, GameObject target, string action)
 {
     if (_fadeScene == null)
     {
         if ((_fadeScene = GameObject.FindObjectOfType(typeof(FadeScene)) as FadeScene) == null)
         {
             Debug.LogError("Fade not found : add FadeScene.prefab in your hierarchy");
             return;
         }
     }
     _fadeScene.action = action;
     _fadeScene.target = target;
     _fadeScene.opaque = opaque;
     _fadeScene.fireEvent = (target != null && action != "");
 }
Пример #2
0
 private void Start()
 {
     instance = this;
 }
Пример #3
0
 private void Awake()
 {
     instance = this;
 }
Пример #4
0
 void Awake()
 {
     audioSource = GetComponent <AudioSource>();
     fade        = GetComponent <FadeScene>();
 }
Пример #5
0
	public void OnApplicationQuit ()
	{
		instance = null;
	}
Пример #6
0
 public void LoadBlue(string name)
 {
     FadeScene.Load(name, new Color(.3f, .3f, .5f, 1f), 2f);
 }