Example #1
0
        /// <summary>
        /// Creates the rocket object and launches it based on the currentplayer's power and angle.
        /// </summary>
        internal void launchRocket()
        {
            if (rocket == null)
            {
                SoundManager.PlayCannonFire();
                rocket = new Rocket(this, spriteBatch, CurrentPlayer, battlefield.Foreground);
                Components.Add(rocket);
                SoundManager.PlayRocketTrail();

            }
        }
Example #2
0
 public static void setUpCollision(Rocket rocket, Texture2D foregroundTexture)
 {
     Collision.rocket = rocket;
     Collision.foregroundColorArray = TextureTo2DArray(foregroundTexture);
     Collision.rocketColorArray = TextureTo2DArray(rocket.rocketTexture);
 }
Example #3
0
 /// <summary>
 /// Resets the rocket once it collides with something.
 /// </summary>
 internal void disposeOfRocket()
 {
     rocket.Dispose();
     rocket = null;
 }