예제 #1
0
 /// <summary>
 /// Constructs a new camera.
 /// </summary>
 /// <param name="game">Game that this camera belongs to.</param>
 /// <param name="position">Initial position of the camera.</param>
 /// <param name="speed">Initial movement speed of the camera.</param>
 public Camera(NewHorizonGame game, Vector3 position, float speed)
 {
     Game = game;
     Position = position;
     Speed = speed;
     ProjectionMatrix = Matrix.CreatePerspectiveFieldOfViewRH(MathHelper.PiOver4, Game.GraphicsDevice.Viewport.AspectRatio, .1f, 10000.0f);
     Mouse.SetPosition(200, 200);
 }
예제 #2
0
 static void Main()
 {
     using (var game = new NewHorizonGame())
         game.Run();
 }
예제 #3
0
 public Player(NewHorizonGame game)
 {
     Camera = new Camera(game, new Vector3(0, 10, 30), 5);
 }