public void OnUpdate() { if (_flashLightModel.ShowBatteryLevel() < 1) { _flashLightUi.SetActive(true); } else { _flashLightUi.SetActive(false); } _flashLightUi.FillAmount = _flashLightModel.ShowBatteryLevel(); if (!IsActive) { _flashLightModel.ChargeBattery(); return; } _flashLightModel.Rotation(); if (_flashLightModel.SpendBattery()) { } else { Off(); } }
public override void On() { if (IsActive) { return; } base.On(); _flashLight.Switch(true); _flashLightUi.SetActive(true); }
public override void On() { if (IsActive) { return; } if (_flashLightModel.BatteryChargeCurrent <= 0) { return; } base.On(); _flashLightModel.Switch(FlashLightActiveType.On); _flashLightUi.SetActive(true); }