Example #1
0
        //=========================================================================================
        /// <summary>
        /// This function is called by the player when the player overlaps the pickup. This 
        /// allows the pickup to perform it's action. After this function is called the pickup will 
        /// be removed from the scene.
        /// </summary>
        /// <param name="taker"> This is the object that took the pickup. </param>
        //=========================================================================================
        public override void OnPickup( PlayerNinja taker )
        {
            // Give the player max health:

            if ( taker != null )
            {
                // Heal up:

                taker.Heal(taker.MaximumHealth);

                // Play the pickup sound:

                Core.Audio.Play("Health_Pickup");
            }
        }
Example #2
0
 //=========================================================================================
 /// <summary>
 /// This function is called by the player when the player overlaps the pickup. This 
 /// allows the pickup to perform it's action. After this function is called the pickup will 
 /// be removed from the scene.
 /// </summary>
 /// <param name="taker"> This is the object that took the pickup. </param>
 //=========================================================================================
 public virtual void OnPickup( PlayerNinja taker )
 {
 }