コード例 #1
0
    // 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);
        }
    }
コード例 #2
0
 private void Awake()
 {
     _playerStack = GetComponentInParent <PlayerStack>();
 }
コード例 #3
0
 private void Awake()
 {
     instance = this;
 }
コード例 #4
0
 public void Init(PlayerStack playerStack)
 {
     _playerStack = playerStack;
 }