/// <summary> /// Reset the game /// </summary> private void ResetGame() { // Clear any existing objects GameObjects.Clear(); // Add the ground GameObjects.Add(new GroundObject(this, Textures["Grass"])); // Add some fire particles for (int i = 0; i < 75; i++) { GameObjects.Add(new FireParticleObject(this, Textures["Fire"], new Vector3(0, 0.1f, 0), new Vector3(0.1f))); } // Add the camera to the game Camera = new CameraObject(this); // Add the sky box Skybox = new MatrixSkyboxObject(this, Textures["Sky"], new Vector3(0, 0.2f, 0), new Vector3(2, 0.8f, 2)); }
/// <summary> /// Reset the game /// </summary> private void ResetGame() { // Clear any existing objects GameObjects.Clear(); // Add the ground GameObjects.Add(new GroundObject(this, Textures["Grass"])); // Add some houses for (int i = 0; i < 4; i++) { GameObjects.Add(new MatrixModelObject(this, new Vector3(-3, 0, i * 3 - 6), Models["House"])); GameObjects.Add(new MatrixModelObject(this, new Vector3(3, 0, i * 3 - 6), Models["House"])); } // Add the camera to the game Camera = new CameraObject(this); // Add the sky box Skybox = new MatrixSkyboxObject(this, Textures["Sky"], new Vector3(0, 0.2f, 0), new Vector3(2, 0.8f, 2)); }
/// <summary> /// Reset the game /// </summary> private void ResetGame() { PaperPlaneObject plane; // Clear any existing objects GameObjects.Clear(); // Add the ground GameObjects.Add(new GroundObject(this, Textures["Grass"])); // Add some houses for (int i = 0; i < 4; i++) { GameObjects.Add(new MatrixModelObject(this, new Vector3(-3, 0, i * 3 - 6), Models["House"])); GameObjects.Add(new MatrixModelObject(this, new Vector3(3, 0, i * 3 - 6), Models["House"])); } // Create and add the paper plane plane = new PaperPlaneObject(this, Vector3.Zero, Models["PaperPlane"]); GameObjects.Add(plane); // Store this plane's reference for easy retrieval later on _plane = plane; //// Add a few other planes to make the scene more interesting //for (int i = 0; i < 15; i++) //{ // plane = new PaperPlaneObject(this, Vector3.Zero, Models["PaperPlane"]); // // Randomize the plane's position and speed // plane._splineIndex = GameHelper.RandomNext(1, PaperPlaneObject._movementPathLength); // plane._splineWeight = GameHelper.RandomNext(0.0f, 1.0f); // plane._splineSpeed = GameHelper.RandomNext(0.01f, 0.03f); // GameObjects.Add(plane); //} // Add the camera to the game Camera = new CameraObject(this); // Add the sky box Skybox = new MatrixSkyboxObject(this, Textures["Sky"], new Vector3(0, 0.2f, 0), new Vector3(2, 1.2f, 2)); }