public override void HighlightTiles(Vector2Int[] tiles, AIDataType aitype) { Vector2Int[] caitiles; //in case of invalid type there in only addition, so it doesn't need to be clared afterwords if (highlighttoupdate.ContainsKey(aitype) && aitype != AIDataType.Invalid) { caitiles = highlighttoupdate[aitype]; } else { highlighttoupdate[aitype] = new Vector2Int[0]; caitiles = highlighttoupdate[aitype]; } //clearing previous texture for (int i = 0; i < caitiles.Length; i++) { highlighttmap.UpdateAt(caitiles[i], AIDataType.None); } //assign new tiles for (int i = 0; i < tiles.Length; i++) { highlighttmap.UpdateAt(tiles[i], aitype); } highlighttoupdate[aitype] = tiles; }
public override void UpdateVisualMinesweeperQuick(KeyValuePair <Vector2Int, MinesweeperElementInfo>[] ToUpdate) { for (int i = 0; i < ToUpdate.Length; i++) { textureMap.UpdateAt(ToUpdate[i].Key, GetSpriteId(ToUpdate[i].Value)); } }