public List<CombatCell> GetCellFromArea(CellArea area, Vector2I centerCellPosition) { List<CombatCell> cells = new List<CombatCell>(); foreach (Vector2I cellPosition in area.GetAreaCellPositions(centerCellPosition)) if (GetCell(cellPosition) != null) cells.Add(GetCell(cellPosition)); return cells; }
public void RemoveCellColorEffect(CellArea area, Vector2I centerCellPosition, CellSelectionType type) { foreach (Vector2I cellPosition in area.GetAreaCellPositions(centerCellPosition)) { if (CellSet.GetCell(cellPosition) == null || CellSet.GetCell(cellPosition).GetColorEffect(type) == null) continue; Map.RemoveObjectToDraw(DrawOrder.MapCell, GetCell(cellPosition).GetColorEffect(type)); } }
public void AddCellColorEffect(CellArea area, Vector2I centerCellPosition, CellSelectionType type) { foreach (Vector2I cellPosition in area.GetAreaCellPositions(centerCellPosition)) { if (CellSet.GetCell(cellPosition) == null) continue; CellShape colorEffect = GetCell(cellPosition).AddColorEffect(type); if (colorEffect != null) Map.AddObjectToDraw(DrawOrder.MapCell, colorEffect); } }