private IEnumerator RoomFinishedCoroutine() { float cTime = Time.time; while (Time.time - cTime <= 1.5f) { float lerpValue = (Time.time - cTime) / (1.5f); _fireImageColor.a = lerpValue; _fireImage.color = _fireImageColor; yield return(null); } yield return(new WaitForSeconds(WAIT_FOR_ENDING_PHOTO_SECONDS)); if (_infoFullscreenGroup != null) { _infoFullscreenGroup.GetComponent <Image>().sprite = Resources.Load <Sprite>("Jadalna/ekran_wygranej_jadalna"); _infoFullscreenGroup.SwitchOn(); } else { BackToMenu(); } yield return(null); }
private void EndRoomOnInfoButtonClicked() { ItemInfoGroup.GetComponentInChildren <Button>().onClick.RemoveAllListeners(); // !!! if (EndingInfoFullscreen != null) { EndingInfoFullscreen.SwitchOn(); } else { EndRoom(); } }
public void Update(IAtlas atlas) { if (m_isActive) { Switchable?.SwitchOn(null, atlas); m_isActive = false; m_wasActive = true; NextUpdateAfter = DELAY; return; } Switchable?.SwitchOff(null, atlas); NextUpdateAfter = 0; m_wasActive = false; }
private IEnumerator RoomFinishedCoroutine() { yield return(new WaitForSeconds(WAIT_FOR_ENDING_PHOTO_SECONDS)); if (InfoFullscreenGroup != null) { //InfoFullscreenGroup.gameObject.SetActive(true); InfoFullscreenGroup.SwitchOn(); } else { BackToMenu(); } yield return(null); }