This is the main type for your game
Inheritance: Microsoft.Xna.Framework.Game
示例#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);
 }
示例#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);
 }
示例#5
0
 protected override void OnCreate(Bundle bundle)
 {
     base.OnCreate(bundle);
     Game1.Activity = this;
     game = new Game1();
     SetContentView(game.Window);
     game.Run();
 }
示例#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);
        }
示例#7
0
 static void Main()
 {
     using (var game = new Game1())
         game.Run();
 }