public BackgroundTile(Int32 column, Int32 row, BackgroundTileData data) { Column = column; Row = row; AssetIndexColumn = data.AssetIndexColumn; AssetIndexRow = data.AssetIndexRow; AssetIndex = new Vector2i(data.AssetIndexColumn, data.AssetIndexRow); Passable = data.Passable; Friction = data.Friction; }
public override BackgroundTileData GetBackgroundTileData(Int32 column, Int32 row) { if (column < 0 || column > BackgroundTileColumns) throw new ArgumentOutOfRangeException(); if (row < 0 || row > BackgroundTileRows) throw new ArgumentOutOfRangeException(); Int32 assetCol = 1; Int32 assetRow = 0; if (column == 2 && row == 2) { assetCol = 3; assetRow = 0; } else if (column == 0 || column == BackgroundTileColumns - 1) { assetCol = 0; assetRow = 0; } else if (row == 0 || row == BackgroundTileRows - 1) { assetCol = 0; assetRow = 0; } BackgroundTileData data = new BackgroundTileData(assetCol, assetRow); return data; }