void ChangeCameraTarget(PlayerMover player)
        {
            foreach (CinemachineVirtualCamera cam in vCams)
            {
                cam.m_Follow = player.transform;
                cam.m_LookAt = player.transform;
            }

            stateDrivenCamera.m_AnimatedTarget = player.GetComponent <Animator>();
        }
    IEnumerator EndReset()
    {
        LevelManager.instance.uiHandler.StartFadeOut();
        player.FreezeMovement(true);

        CharacterStats pStats = player.GetComponent <CharacterStats>();

        pStats.invuln = true;

        yield return(new WaitForSeconds(4));

        ResetScene();
    }
Esempio n. 3
0
 public void StopAttack()         //Called by animator
 {
     mover.GetComponent <Animator>().SetTrigger("stopAttacking");
     hasHit = false;
 }
Esempio n. 4
0
 private void OnEnable()
 {
     _generator.ReachedEndLevel += OnReachEndLevel;
     _player       = _mover.GetComponent <Player>();
     _player.Died += OnPlayerDied;
 }