示例#1
0
 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));
     }
 }
示例#2
0
    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);
                }
            }
        }
    }