Пример #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;
        }