コード例 #1
0
ファイル: Camera.cs プロジェクト: PaTraVis/NewHorizons
 /// <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
ファイル: Program.cs プロジェクト: PaTraVis/NewHorizons
 static void Main()
 {
     using (var game = new NewHorizonGame())
         game.Run();
 }
コード例 #3
0
ファイル: Player.cs プロジェクト: PaTraVis/NewHorizons
 public Player(NewHorizonGame game)
 {
     Camera = new Camera(game, new Vector3(0, 10, 30), 5);
 }