public void Off() { light.enabled = false; if (FlashlightStateChanged != null) { FlashlightStateChanged.Invoke(false); } }
public void Off() { if (!_light) { return; } _light.enabled = false; FlashlightStateChanged?.Invoke(false); }
public void On() { if (fillAmount < 0.3f) { return; } light.enabled = true; if (FlashlightStateChanged != null) { FlashlightStateChanged.Invoke(true); } }
public void On() { if (chargeAmount < 0.3f) { return; } if (!_light) { return; } _light.enabled = true; FlashlightStateChanged?.Invoke(true); }