Esempio n. 1
0
 public virtual void TurnOff()
 {
     Rect.SetActive(false);
     TurnedOff?.Invoke();
     if (Top.Peek() == this)
     {
         Top.Pop();
     }
 }
Esempio n. 2
0
 public override void Off() // выключили холодильник
 {
     if (Status)
     {
         Status = false;
         if (TurnedOff != null)
         {
             TurnedOff.Invoke("Холодильник выключили");
         }
     }
 }
Esempio n. 3
0
    public IEnumerator TempButton()
    {
        m_Activated          = true;
        m_AlreadyInteracting = true;
        TurnedOn.Invoke();
        yield return(new WaitForSeconds(m_TempButtonDuration));

        m_Activated          = false;
        m_AlreadyInteracting = false;
        TurnedOff.Invoke();
    }
Esempio n. 4
0
    private IEnumerator OnWhileOn()
    {
        m_Activated          = true;
        m_AlreadyInteracting = true;
        TurnedOn.Invoke();
        yield return(null);

        yield return(null);

        Debug.Log("Off");
        m_Activated          = false;
        m_AlreadyInteracting = false;
        TurnedOff.Invoke();
        m_OnWhileTriggered = null;
    }
Esempio n. 5
0
    public IEnumerator ActivationCooldown()
    {
        m_Activated          = !m_Activated;
        m_AlreadyInteracting = true;
        if (m_Activated)
        {
            TurnedOn.Invoke();
        }
        else
        {
            TurnedOff.Invoke();
        }
        yield return(new WaitForSeconds(m_DelayBetweenActivations));

        m_AlreadyInteracting = false;
    }
Esempio n. 6
0
 protected virtual void OnButtonOff() => TurnedOff?.Invoke(this, EventArgs.Empty);