コード例 #1
0
    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);
            }
        }
    }
コード例 #2
0
 public void SetActiveScript(CandleTrigger ct)
 {
     ci.SetActiveTrigger(ct);
 }
コード例 #3
0
 public void SetActiveTrigger(CandleTrigger ct)
 {
     activeTrigger = ct;
 }