Done?
This commit is contained in:
@@ -184,6 +184,25 @@ namespace Level
|
||||
}
|
||||
|
||||
|
||||
public bool UnoccupiedTargetExists()
|
||||
{
|
||||
// This can be optimized by creating a mapping to all target points
|
||||
// But I'm not doing that
|
||||
for (int y = 0; y < height; y++)
|
||||
{
|
||||
for (int x = 0; x < width; x++)
|
||||
{
|
||||
if (layout[y][x].cellData.isTarget && layout[y][x].cellData.cellContent != LayoutCell.LayoutCellData.CellContent.Crate)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private void EditCellAt(Vector3 worldPos)
|
||||
{
|
||||
LayoutCell layoutCell = WorldToLayoutCell(worldPos);
|
||||
|
||||
Reference in New Issue
Block a user