Ejemplo n.º 1
0
        public void Initialization()
        {
            _weapons = ServiceLocatorMonoBehaviour.GetService <CharacterController>().
                       GetComponentsInChildren <Weapon>();

            foreach (var weapon in Weapons)
            {
                weapon.IsVisible = false;
            }

            FlashLight = Object.FindObjectOfType <FlashLightModel>();
            FlashLight.Switch(FlashLightActiveType.Off);
        }
Ejemplo n.º 2
0
 public override void On(params BaseObjectScene[] flashLight)
 {
     if (IsActive)
     {
         return;
     }
     if (flashLight.Length > 0)
     {
         _flashLightModel = flashLight[0] as FlashLightModel;
     }
     if (_flashLightModel == null)
     {
         return;
     }
     if (_flashLightModel.BatteryChargeCurrent <= 0)
     {
         return;
     }
     base.On(_flashLightModel);
     _flashLightModel.Switch(FlashLightActiveType.On);
     UiInterface.FlashLightUi.SetActive(true);
     UiInterface.FlashLightUi.SetColor(Color.green);
     _flashLightUi.SetActive(true);
 }