public void touchOnPasiva() { if (somethingTouched) { return; } chosenMask = 1; pasivaAgresiva.fadeOut(); agresiva.fadeOut(); pasiva.fadeOut(); asertiva.fadeOut(); somethingTouched = true; //syncCanvas.SetActive (true); if (myTurn) { state = 1; botonOK.scaleIn(); } else { syncCanvas.SetActive(true); state = 2; } }
// Update is called once per frame void Update() { if (remaining > 0.0f) { remaining -= Time.deltaTime; if (remaining <= 0.0f) { if (fadeType == FadeType.ToOpaque) { textAndImageFader.fadeIn(); } else { textAndImageFader.fadeOut(); } } } }
// Update is called once per frame void Update() { if (state == 0) { // do nothing } if (state == 1) { textAndImage.fadeIn(); state = 2; } if (state == 2) { timer += Time.deltaTime; if (timer > (showingTime / 2.0f)) { timer = 0.0f; state = 3; } } if (state == 3) { textAndImage.fadeOut(); state = 4; } if (state == 4) { timer += Time.deltaTime; if (timer > (showingTime / 2.0f)) { timer = 0.0f; state = 0; Destroy(this.gameObject); } } }