Exemple #1
0
 public void Off()
 {
     light.enabled = false;
     if (FlashlightStateChanged != null)
     {
         FlashlightStateChanged.Invoke(false);
     }
 }
Exemple #2
0
        public void Off()
        {
            if (!_light)
            {
                return;
            }
            _light.enabled = false;

            FlashlightStateChanged?.Invoke(false);
        }
Exemple #3
0
        public void On()
        {
            if (fillAmount < 0.3f)
            {
                return;
            }

            light.enabled = true;
            if (FlashlightStateChanged != null)
            {
                FlashlightStateChanged.Invoke(true);
            }
        }
Exemple #4
0
        public void On()
        {
            if (chargeAmount < 0.3f)
            {
                return;
            }
            if (!_light)
            {
                return;
            }
            _light.enabled = true;

            FlashlightStateChanged?.Invoke(true);
        }