コード例 #1
0
ファイル: GameLayer.cs プロジェクト: jrs1498/IsometricProject
        /// <summary>
        /// GameLayers operate independently within a GameLevel
        /// </summary>
        public GameLayer(GameLevel gameLevel, float parallaxAmount = 1.0f)
        {
            _gameLevel = gameLevel;
            _gameObjects = new List<GameObject>();

            _parallaxAmount = parallaxAmount;

            GetCamTransformation();
        }
コード例 #2
0
        /// <summary>
        /// Creates a GameScreen which handles gameplay
        /// </summary>
        public GameScreen(ScreenHandler screenHandler)
            : base(screenHandler)
        {
            // ---------- Create ContentLibrary ----------
            _contentLibrary = new ContentLibrary(Content);

            // ---------- Create GameLevel ----------
            _gameLevel = new GameLevel(this, "poopies");
            //_gameLevel = new GameLevel(this, 40, 40, 1);

            // ---------- Create GameInterface ----------
            _gameInterface = new GameInterface(this);
        }
コード例 #3
0
 /// <summary>
 /// Creates a GameLayerTiled from a data file
 /// </summary>
 /// <param name="gameLevel">GameLevel containing this layer</param>
 /// <param name="layerData">Data for this GameLayerTiled</param>
 public GameLayerTiled(GameLevel gameLevel, GameLayerTiledData layerData)
     : base(gameLevel)
 {
     _tileSystem = new TileSystem(this, layerData.TileSystemData);
 }
コード例 #4
0
 /// <summary>
 /// Creates a GameLayer with a new TileSystem
 /// </summary>
 /// <param name="gameLevel">GameLevel containing this layer</param>
 /// <param name="numRows">Number of tile rows</param>
 /// <param name="numCols">Number of tile columns</param>
 /// <param name="defaultTileReferenceCode">Default tile to populate TileSystem</param>
 public GameLayerTiled(GameLevel gameLevel, int numRows, int numCols, byte defaultTileReferenceCode)
     : base(gameLevel)
 {
     _tileSystem = new TileSystem(this, numRows, numCols, defaultTileReferenceCode);
 }