public virtual void TurnOff() { Rect.SetActive(false); TurnedOff?.Invoke(); if (Top.Peek() == this) { Top.Pop(); } }
public override void Off() // выключили холодильник { if (Status) { Status = false; if (TurnedOff != null) { TurnedOff.Invoke("Холодильник выключили"); } } }
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(); }
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; }
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; }
protected virtual void OnButtonOff() => TurnedOff?.Invoke(this, EventArgs.Empty);