Exemple #1
0
        public void Die()
        {
            isDying = true;

            SaveSystem.AddDeathToCounter();
            SaveSystem.ResetEnemies();
            SaveSystem.ResetDecorations();

            var player = GameManager.Player;

            player.isControlled = false;

            player.maskParticles.Stop();

            player.SpriteAnimator.SetTrigger(DieTrigger);
            player.AnimationController.SetAnimatorUpdateToUnscaledTime();

            player.deathParticlesController.Play();

            player.Rigidbody.velocity    = Vector2.zero;
            player.Rigidbody.isKinematic = true;

            GameManager.Orb.Hide();

            GameManager.Player.StartCoroutine(RespawnCoroutine());

            RoomManager.targetRoomChangerID = -1;

            //PauseController.Instance.Pause();
        }