public void lose() { GameObject go = GameObject.Find("Win"); LogoFadeIn other = (LogoFadeIn)go.GetComponent(typeof(LogoFadeIn)); other.startFading(MovingTextManager.FadeType.In); endScene = true; }
void OnTriggerEnter2D(Collider2D col) { if (col.gameObject.tag == "InvisibleBoxCollider") { MovingTextManager.Instance.FadeText("InitialCutsceneText", MovingTextManager.FadeType.Out); GameObject go = GameObject.Find("logo_main"); LogoFadeIn other = (LogoFadeIn)go.GetComponent(typeof(LogoFadeIn)); other.startFading(MovingTextManager.FadeType.In); } MovingTextManager.Instance.FadeText("StartGameText", MovingTextManager.FadeType.In); }
// Update is called once per frame void Update() { if (Input.touchCount > 0 || Input.GetMouseButtonDown(0)) { GameObject go = GameObject.Find("logo_main"); LogoFadeIn other = (LogoFadeIn)go.GetComponent(typeof(LogoFadeIn)); if (!other.isFaded) { SceneManager.LoadScene("Scene_Tutorial"); } } }