protected virtual void SetActive(bool active)
    {
        if (_activable == null)
        {
            return;
        }

        _active = active;
        SetActiveColor(active);

        if (_desactivationButton)
        {
            active = !active;
        }

        if (active)
        {
            _activable.Activate();
        }
        else
        {
            _activable.Deactivate();
        }
    }
Example #2
0
 public void Deactivate()
 {
     _accessGrant = AccessGrant.No;
     SetActiveColor(AccessGrant.No);
     _activable.Deactivate();
 }