Exemplo n.º 1
0
        /// <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();
        }
Exemplo n.º 2
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);
 }
Exemplo n.º 3
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);
 }