void UpdateTargetDisplay() { BlockRangeDisplay.ClearDisplay(decalProjectors); decalProjectors = new List <GameObject>(); foreach (GridObject gridObject in Targets) { decalProjectors.AddRange(BlockRangeDisplay.RectangleDisplay(TileIndicator, GridCrafter.blockGrid, gridObject.pos, gridObject.TileSize)); } }
public void HoverDisplay() { Vector2Int grid_pos = BlockAtMouse(); if (grid_pos != new Vector2Int(-1, -1)) { if (grid_pos != selectionPos) { BlockRangeDisplay.ClearDisplay(decalProjectors); selectionPos = grid_pos; if (LevelFloor(grid_pos, selectionRange)) { decalProjectors = BlockRangeDisplay.RectangleDisplay(rangeIndicator, blockGrid, selectionPos, selectionRange); } else { decalProjectors = BlockRangeDisplay.RectangleDisplay(rangeErrorIndicator, blockGrid, selectionPos, selectionRange); } } } }