Example #1
0
        /// <summary>
        /// The object is no longer alive
        /// </summary>
        /// <param name="position">The position of the damage.</param>
        /// <param name="force">The amount of force applied to the object while taking the damage.</param>
        /// <param name="attacker">The GameObject that killed the character.</param>
        public override void Die(Vector3 position, Vector3 force, GameObject attacker)
        {
            m_CharacterLayer = m_GameObject.layer;
            base.Die(position, force, attacker);

            if (m_DeathLayer != 0)
            {
                m_CharacterLocomotion.SetCollisionLayer(m_DeathLayer);
            }
        }