/// <summary> /// Turn on flashlight /// </summary> public override void On() { if (IsActive) { return; } if (_flashLightModel.BatteryChargeCurrent <= 0) { return; } base.On(); _flashLightModel.Switch(FlashLightActiveType.On); }
public void Initialization() { _weapons = ServiceLocatorMonoBehaviour.GetService <CharacterController>(). GetComponentsInChildren <BaseWeaponObject>(); foreach (var weapon in Weapons) { weapon.IsVisible = false; } FlashLight = Object.FindObjectOfType <FlashLightModel>(); FlashLight.Switch(FlashLightActiveType.Off); }