Exemple #1
0
        public void OnStart()
        {
            _flashLightModel = GameObject.FindObjectOfType <FlashLightModel>();

            _flashLightPowerUi      = UiInterface.FlashLightPowerUi;
            _flashLightStateImageUi = UiInterface.FlashLightStateImageUi;
        }
Exemple #2
0
        public void Initialization()
        {
            _weapons = ServiceLocatorMonoBehavior.GetService <CharacterController>().
                       GetComponentsInChildren <Weapon>();

            foreach (var weapon in Weapons)
            {
                //Debug.Log($"weapon:{weapon}, weapon.name:{weapon.name}");
                weapon.IsVisible = false;
            }

            FlashLight = Object.FindObjectOfType <FlashLightModel>();
            FlashLight.Switch(FlashLightActiveType.Off);
        }
 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);
     //_flashLightUiText.SetActive(true);
 }
 public void Initialization()
 {
     _flashLightModel  = Object.FindObjectOfType <FlashLightModel>();
     _flashLightUiText = Object.FindObjectOfType <FlashLightUiText>();
     _flashLightUiBar  = Object.FindObjectOfType <FlashLightUiBar>();
 }