public override void On(params BaseObjectScene[] flashlight)
 {
     if (IsActive)
     {
         return;
     }
     if (flashlight.Length > 0)
     {
         _flashlightModel = flashlight[0] as FlashlightModel;
     }
     if (_flashlightModel.CurrentBatteryCharge <= 0)
     {
         return;
     }
     base.On(_flashlightModel);
     _flashlightModel.Switch(FlashlightActiveType.On);
     UIInterface.LightUIText.SetActive(true);
     UIInterface.FlashlightUIBar.SetActive(true);
     UIInterface.FlashlightUIBar.SetColor(Color.green);
 }
示例#2
0
 private void SetActiveFlashlight(bool value)
 {
     _light.Switch(value);
 }