コード例 #1
0
ファイル: LevelView.cs プロジェクト: tomand/Troopers
 public LevelView(GraphicsDevice graphicsDevice, ContentManager content,  LevelManager levelManager, Camera cam)
     : base(cam)
 {
     _levelManager = levelManager;
     _trooperView = new TrooperView(cam);
     _cursorView = new CursorView(cam);
     _mediKitView = new MediKitView(cam);
     _buildingView = new BuildingView(cam);
     _trooperHitViews = new List<TrooperHitView>();
     _ammoView = new AmmoView(cam);
 }
コード例 #2
0
ファイル: LevelController.cs プロジェクト: tomand/Troopers
        public LevelController(int viewportWidth, int viewportHeight, GraphicsDevice graphicsDevice, ContentManager content)
        {
            this._viewportWidth = viewportWidth;
            this._viewportHeight = viewportHeight;
            this._graphicsDevice = graphicsDevice;
            this._content = content;
            _levelManager = new Model.LevelManager(_numberOfXTiles, _numberOfYTiles);

            _levelCamera = new Camera(_viewportHeight, _viewportWidth, xOffset: 10, yOffset: 10, xTileSize: _xTileSize, yTileSize: _yTileSize, numberOfXTiles: _numberOfXTiles, numberOfYTiles: _numberOfYTiles);

            _levelView = new LevelView(_graphicsDevice, _content, _levelManager, _levelCamera);
            _killedTrooperView = new KilledTrooperView(_levelCamera);
            _trooperInfoController = new InfoController( viewportWidth,  viewportHeight,  graphicsDevice,  content, xOffset: 10 +5 + _xTileSize * _numberOfXTiles, yOffset: 10);
        }