IEnumerator ChangeText(float duration) { if (activeTrigger != null) { activeTrigger.IsHidden(true); activeTrigger.HideText(); yield return(new WaitForSeconds(duration)); activeTrigger.UnhideText(); activeTrigger.IsHidden(false); } else { CandleTrigger[] candleTrigger = new CandleTrigger[triggerArea.Length]; for (int i = 0; i < triggerArea.Length; i++) { candleTrigger[i] = triggerArea[i].GetComponent <CandleTrigger>(); candleTrigger[i].IsHidden(true); candleTrigger[i].HideText(); } yield return(new WaitForSeconds(duration)); for (int i = 0; i < candleTrigger.Length; i++) { candleTrigger[i].UnhideText(); candleTrigger[i].IsHidden(false); } } }
public void SetActiveScript(CandleTrigger ct) { ci.SetActiveTrigger(ct); }
public void SetActiveTrigger(CandleTrigger ct) { activeTrigger = ct; }