Beispiel #1
0
 private void Reilluminate()
 {
     if (illuminator != null && changeIlluminationWithPress)
     {
         illuminator.Illuminate();
     }
 }
    private IEnumerator BlinkButton(IlluminatingObject illuminator, int blinks)
    {
        for (int i = 0; i < blinks; i++)
        {
            StartCoroutine(illuminator.Illuminate(blinkDuration / 2));
            yield return(new WaitForSeconds(blinkDuration / 2));

            StartCoroutine(illuminator.Deilluminate(blinkDuration / 2));
            yield return(new WaitForSeconds(blinkDuration / 2));
        }
    }
Beispiel #3
0
    private void Start()
    {
        if (manager != null)
        {
            manager.AddButton(this);
        }
        press       = GetComponent <PressableButton>();
        illuminator = GetComponent <IlluminatingObject>();

        if (illuminator != null && changeIlluminationWithPress)
        {
            illuminator.Illuminate();
        }
    }