This is the main type for your game
Inheritance: Microsoft.Xna.Framework.Game
Exemplo n.º 1
0
        public Camera(Game1 game)
        {
            this.game = game;
            projectionMatrix = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, game.GraphicsDevice.Viewport.AspectRatio, 0.3f, 10000000.0f);

            Mouse.SetPosition(game.GraphicsDevice.Viewport.Width / 2, game.GraphicsDevice.Viewport.Height / 2);
        }
 public CubeModelInvertedForSkybox(Game1 game, int width, int height, int depth, TexturePosInfo texturePosInfo)
 {
     this.game = game;
     this.width = width;
     this.height = height;
     this.depth = depth;
     GoGenerateVertices(texturePosInfo);
 }
 public CubeModelForPlayer(Game1 game, float width, float height, float depth, TexturePosInfo texturePosInfo)
 {
     this.game = game;
     this.width = width;
     this.height = height;
     this.depth = depth;
     GoGenerateVertices(texturePosInfo);
 }
Exemplo n.º 4
0
 public CubeModel(Game1 game, float width, float height, float depth, TexturePosInfo texturePosInfo, float imageSizeFactor)
 {
     this.game = game;
     this.width = width;
     this.height = height;
     this.depth = depth;
     GoGenerateVertices(texturePosInfo, imageSizeFactor);
 }
Exemplo n.º 5
0
 protected override void OnCreate(Bundle bundle)
 {
     base.OnCreate(bundle);
     Game1.Activity = this;
     game = new Game1();
     SetContentView(game.Window);
     game.Run();
 }
Exemplo n.º 6
0
        public PlayerModel(Game1 game)
        {
            headModel = new CubeModelForPlayer(game, 8, 8, 8, TexturePosInfoGenerator.Head);
            bodyModel = new CubeModelForPlayer(game, 8, 12, 4, TexturePosInfoGenerator.Body);

            armModelLeft = new CubeModelForPlayer(game, 4, 12, 4, TexturePosInfoGenerator.ArmLeft);
            armModelRight = new CubeModelForPlayer(game, 4, 12, 4, TexturePosInfoGenerator.ArmRight);

            legModelLeft = new CubeModelForPlayer(game, 4, 12, 4, TexturePosInfoGenerator.LegLeft);
            legModelRight = new CubeModelForPlayer(game, 4, 12, 4, TexturePosInfoGenerator.LegRight);
        }
Exemplo n.º 7
0
 static void Main()
 {
     using (var game = new Game1())
         game.Run();
 }