/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here IsMouseVisible = true; starArray = new Background[100]; for (int i = 0; i < starArray.Length; i++) { starArray[i] = new Background(); } screenWidth = graphics.PreferredBackBufferWidth; screenHeight = graphics.PreferredBackBufferHeight; currentScore = new Current_Score(); endScreen = new End_Screen(); gameStatus = true; spacePressed = false; timer = 0; seconds = 0; missiles = new List <Missile>(); oldKB = Keyboard.GetState(); player1 = new Player(); themeRect = new Rectangle(0, 0, screenWidth, 500); themeRect = new Rectangle(0, 0, screenWidth, 500); missiles = new List <Missile>(); oldKB = Keyboard.GetState(); player1 = new Player(); enemy = new Enemies(enemyTex); base.Initialize(); }
public End_Screen() { gameOverText = "Game Over"; resultText = "-RESULTS-"; cs = new Current_Score(); shotsFired = "SHOTS FIRED " + cs.getShotsFired(); numOfHits = "NUMBER OF HITS " + cs.getHits(); hitMissRatio = "HIT-MISS RATIO " + cs.getAccuracy(); }