/// <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(); } }
public static void setUpCollision(Rocket rocket, Texture2D foregroundTexture) { Collision.rocket = rocket; Collision.foregroundColorArray = TextureTo2DArray(foregroundTexture); Collision.rocketColorArray = TextureTo2DArray(rocket.rocketTexture); }
/// <summary> /// Resets the rocket once it collides with something. /// </summary> internal void disposeOfRocket() { rocket.Dispose(); rocket = null; }