requirements foundation

This commit is contained in:
2022-11-07 14:21:00 +01:00
parent 7e9331f612
commit 8719543f96
34 changed files with 332 additions and 160 deletions

View File

@@ -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})";
}
}