Пример #1
0
        /// <summary>
        /// Kill the player.
        /// </summary>
        public void Die()
        {
            Instantiate(
                player.EffectsSettings.DeathEffect,
                player.Physics.Position,
                Quaternion.identity
                );

            playerSprite.enabled = false;

            TransitionManager.Wipe();

            player.Physics.Disable();

            if (player.CarriedItem != null)
            {
                player.CarriedItem.OnPutDown();
            }

            player.EndInteraction();

            player.DisableCrouch(this);
            player.DisableJump(this);
            player.DisableMove(this);

            isDead = true;
        }