Exemplo n.º 1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Exemplo n.º 2
0
        public Camera(Game1 game)
            : base(game)
        {
            _isViewDirty = true;

            Position = Vector3.Zero;
            Rotation = Quaternion.Identity;
        }
Exemplo n.º 3
0
        public Player(Game1 game)
            : base(game)
        {
            _game = game;
            _yaw = _pitch = 0;
            _position = Vector3.Zero;
            _jumping = false;
            _currentGravity = Map.AIR_GRAVITY;

            _blockAccessor = new BlockAccessor(_game.Map);
        }
Exemplo n.º 4
0
        public Map(Game1 game)
            : base(game)
        {
            _game = game;

            Seed = new Random().Next();

            SolidVertexList = new List<VertexPositionNormalTexture>();
            SolidIndexList = new List<int>();

            _chunks = new Chunk[NUM_CHUNKS_WIDTH * NUM_CHUNKS_DEPTH * NUM_CHUNKS_HEIGHT];
        }
Exemplo n.º 5
0
        public Chunk(Game1 game, Vector3 offset, Block[] blocks)
        {
            _game = game;
            _offset = offset;

            _boundingBox = new BoundingBox(
                new Vector3(_offset.X * WIDTH, _offset.Y * HEIGHT, _offset.Z * DEPTH),
                new Vector3((_offset.X + 1) * WIDTH, (_offset.Y + 1) * HEIGHT, (_offset.Z + 1) * DEPTH));

            _solidVertexList = new List<VertexPositionNormalTexture>();
            _solidIndexList = new List<int>();
            _solidIndicesDict = new Dictionary<int,List<int>>();
            _solidBlocksOffsetsList = new List<int>();

            _liquidVertexList = new List<VertexPositionNormalTexture>();
            _liquidIndexList = new List<int>();
            _liquidIndicesDict = new Dictionary<int, List<int>>();
            _liquidBlocksOffsetsList = new List<int>();

            _blocks = blocks;
            _blockAccessor = new BlockAccessor(_game.Map);

            _effect = new BasicEffect(_game.GraphicsDevice);
        }
Exemplo n.º 6
0
 public DebugInfos(Game1 game)
     : base(game)
 {
     _game = game;
     _font = _game.Content.Load<SpriteFont>("Fonts/main");
 }
Exemplo n.º 7
0
 public SkyDome(Game1 game)
     : base(game)
 {
     _game = game;
 }