// Update is called once per frame private void Update() { if (GameManager.instance.IsGameOver()) { return; } UpdateMovement(); UpdateFellowMovement(); if (Input.GetKeyDown(KeyCode.Space) || SimpleInput.GetButtonDown("Light")) { if (flashLight.LifeBattery()) { lightOn = !lightOn; } } FlashLightToggle(lightOn); PlayerStack.instance.PlayerFear(numberHumanNotFear, maxFear); if (PlayerStack.ReachFearLimit()) { GameManager.instance.EndGame(); } if (lightOn) { flashLight.PlayerBattery(flashLight.maxBattery); } }
private void Awake() { _playerStack = GetComponentInParent <PlayerStack>(); }
private void Awake() { instance = this; }
public void Init(PlayerStack playerStack) { _playerStack = playerStack; }