/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Game1 game = new Game1()) { game.Run(); } }
public Camera(Game1 game) : base(game) { _isViewDirty = true; Position = Vector3.Zero; Rotation = Quaternion.Identity; }
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); }
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]; }
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); }
public DebugInfos(Game1 game) : base(game) { _game = game; _font = _game.Content.Load<SpriteFont>("Fonts/main"); }
public SkyDome(Game1 game) : base(game) { _game = game; }