new int [6] {0,1,3,3,1,2};
// Коробка навколо нашої стіни = new BoundingBox ();. Min = new Vector3 (1, 1,-0.1f);. Max = new Vector3 (10, 7, 0.1f);. Initialize ();
}
///
///LoadContent will be called once per game and is the place to load
///all of your content.
/// override void LoadContent ()
{
// Create a new SpriteBatch, which can be used to draw textures. = new SpriteBatch (GraphicsDevice); aspectRatio; = (float) graphics.GraphicsDevice.Viewport.Width/(float) graphics.GraphicsDevice.Viewport.Height/ 1.3f; FOV = MathHelper.PiOver4; = Matrix.CreatePerspectiveFieldOfView (FOV, aspectRatio, 1f, 1000f); = Content.Load ("2"); = Content.Load ("1") ;
// TODO: use this.Content to load your game content here = Content.Load ("e1"); = Content.Load ("n1"); = Content.Load < Texture2D> ("s1"); = Content.Load ("w1"); = Content.Load ("up");
}
///
///UnloadContent will be called once per game and is the place to unload
///all content.
/// override void UnloadContent ()
{
// TODO: Unload any non ContentManager content here . Unload ();
}
///
///Allows the game to run logic such as updating the world,
///checking for collisions, gathering input, and playing audio.
///
/// Provides a snapshot of timing values. override void Update (GameTime gameTime)
{
// Allows the game to exit (GamePad.GetState (PlayerIndex.One). Buttons.Back == ButtonState.Pressed). Exit (); (int i = 0; i <10; i + +)
{[i] = Matrix.CreateTranslation (0, 0,-a [i]) * Matrix.CreateRotationX (0.02f) * Matrix.CreateTranslation (0, 0, a [i]) * worldLop [i];
}
// TODO: Add your update logic herekeyboardState; = Keyboard.GetState (); (keyboardState.IsKeyDown (Keys.Escape) == true). Exit ();
// Повороти плавні (keyboardState.IsKeyDown (Keys.Up) == true)// поворот навколо X = Matrix.Multiply (viewMatrix, Matrix.CreateRotationX (0.01f)); (keyboardState.IsKeyDown (Keys.Down) == true)// поворот навколо X = Matrix.Multiply (viewMatrix, Matrix.CreateRotationX (-0.01f)); (keyboardState.IsKeyDown (Keys.Right) == true)// поворот навколо Y = Matrix.Multiply (viewMatrix , Matrix.CreateRotationY (0.01f)); (keyboardState.IsKeyDown (Keys.Left) == true)// поворот навколо Y = Matrix.Multiply (viewMatrix, Matrix.CreateRotationY (-0.01f));
// Кроки плавні (keyboardState.IsKeyDown (Keys.A) == true)// вправо = Matrix.Multiply (viewMatrix, Matrix.CreateTranslation (new Vector3 (1, 0, 0))); (keyboardState.IsKeyDown (Keys.D) == true)// вліво = Matrix.Multiply (viewMatrix, Matrix.CreateTranslation (new Vector3 (-1, 0, 0))); (keyboardState.IsKeyDown (Keys.E) == true)//вгору = Matrix.Multiply (viewMatrix, Matrix.CreateTranslation (new Vector3...