예제 #1
0
파일: wormz.cs 프로젝트: slstrozier/Wormz
        /// <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();

            }
        }
예제 #2
0
 public static void setUpCollision(Rocket rocket, Texture2D foregroundTexture)
 {
     Collision.rocket = rocket;
     Collision.foregroundColorArray = TextureTo2DArray(foregroundTexture);
     Collision.rocketColorArray = TextureTo2DArray(rocket.rocketTexture);
 }
예제 #3
0
파일: wormz.cs 프로젝트: slstrozier/Wormz
 /// <summary>
 /// Resets the rocket once it collides with something.
 /// </summary>
 internal void disposeOfRocket()
 {
     rocket.Dispose();
     rocket = null;
 }