Exemplo n.º 1
0
        // Update is called once per frame
        void Update()
        {
            _groupState = GetState();

            if (_groupState != _prevGroupState)
            {
                if (_groupState == ToggleGroupState.AllOn)
                {
                    onAllTogglesOn.Invoke();
                }

                if (_groupState == ToggleGroupState.AllOff)
                {
                    onAllTogglesOff.Invoke();
                }
            }

            _prevGroupState = _groupState;
        }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     _groupState = _prevGroupState = GetState();
 }