requirements foundation
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Escape_Room_Engine.Engine.Scripts
|
||||
{
|
||||
@@ -39,6 +40,24 @@ namespace Escape_Room_Engine.Engine.Scripts
|
||||
|
||||
public int Area => width * length;
|
||||
|
||||
public HashSet<Vector2Int> EveryPosition
|
||||
{
|
||||
get
|
||||
{
|
||||
var positions = new HashSet<Vector2Int>();
|
||||
|
||||
for (var zIter = 0; zIter < length; zIter++)
|
||||
{
|
||||
for (var xIter = 0; xIter < width; xIter++)
|
||||
{
|
||||
positions.Add(new Vector2Int(xIter, zIter));
|
||||
}
|
||||
}
|
||||
|
||||
return positions;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString() => $"({width}, {length}) at ({x}, {z})";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user