示例#1
0
        /// <summary>
        /// This code Disposes the sphere, body and gameNode of the playerModel object.
        /// </summary>
        public override void Dispose()
        {
            if (sphere != null)
            {
                sphere.Dispose();
            }

            if (body != null)
            {
                body.Dispose();
            }

            if (gameNode != null)
            {
                gameNode.Dispose();
            }

            if (powerCells != null)
            {
                powerCells.Dispose();
            }

            Physics.RemovePhysObj(physObj);
            physObj = null;
        }
示例#2
0
 /// <summary>
 /// Disposes of the enemy model.
 /// </summary>
 virtual protected void Dispose()
 {
     if (enemy != null)
     {
         enemy.Dispose();
     }
 }
示例#3
0
        /// <summary>
        /// Disposes of the physics and the model.
        /// </summary>
        public override void Dispose()
        {
            Physics.RemovePhysObj(physObj);
            physObj = null;

            gameNode.Parent.RemoveChild(lifePuModel.GameNode);
            lifePuModel.GameNode.DetachAllObjects();
            lifePuModel.GameNode.Dispose();
            lifePuModel.Dispose();
        }
示例#4
0
        /// <summary>
        /// This disposes the components of the bomb gun.
        /// </summary>
        public override void Dispose()
        {
            if (bombGun != null)
            {
                bombGun.Dispose();
            }

            if (gameNode != null)
            {
                gameNode.Dispose();
            }
        }
示例#5
0
        /// <summary>
        /// Disposes of the model and the game node.
        /// </summary>
        virtual protected void Dispose()
        {
            if (cannonGun != null)
            {
                cannonGun.Dispose();
            }

            if (gameNode != null)
            {
                gameNode.Dispose();
            }
        }
示例#6
0
        /// <summary>
        /// Disposes the model, physics and gameNode.
        /// </summary>
        virtual protected void Dispose()
        {
            if (cannonBall != null)
            {
                cannonBall.Dispose();
            }

            if (gameNode != null)
            {
                gameNode.Dispose();
            }

            Physics.RemovePhysObj(physObj);
            physObj = null;
        }