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 != ""); }
private void Start() { instance = this; }
private void Awake() { instance = this; }
void Awake() { audioSource = GetComponent <AudioSource>(); fade = GetComponent <FadeScene>(); }
public void OnApplicationQuit () { instance = null; }
public void LoadBlue(string name) { FadeScene.Load(name, new Color(.3f, .3f, .5f, 1f), 2f); }