public void SetupWorldBlockers() { if (!enabled) { return; } blockerHandler.SetupGlobalBlockers(sceneHandler.GetAllLoadedScenesCoords(), 100, blockersParent); }
public void PutBlockersAroundExplorableArea() { blockerHandler.SetupGlobalBlockers(sceneHandler.GetAllLoadedScenesCoords(), 10, blockersParent.transform); var blockers = blockerHandler.GetBlockers(); Assert.AreEqual(blockers.Count(), 12); Assert.IsFalse(blockers.ContainsKey(new Vector2Int(0, 0))); Assert.IsFalse(blockers.ContainsKey(new Vector2Int(-1, 0))); Assert.IsFalse(blockers.ContainsKey(new Vector2Int(-1, 1))); Assert.IsTrue(blockers.ContainsKey(new Vector2Int(1, 0))); Assert.IsTrue(blockers.ContainsKey(new Vector2Int(0, 1))); Assert.IsTrue(blockers.ContainsKey(new Vector2Int(0, -1))); Assert.IsTrue(blockers.ContainsKey(new Vector2Int(1, 1))); Assert.IsTrue(blockers.ContainsKey(new Vector2Int(-1, -1))); Assert.IsTrue(blockers.ContainsKey(new Vector2Int(1, -1))); Assert.IsTrue(blockers.ContainsKey(new Vector2Int(-2, 0))); Assert.IsTrue(blockers.ContainsKey(new Vector2Int(-2, -1))); Assert.IsTrue(blockers.ContainsKey(new Vector2Int(-2, 1))); Assert.IsTrue(blockers.ContainsKey(new Vector2Int(-1, 2))); Assert.IsTrue(blockers.ContainsKey(new Vector2Int(0, 2))); Assert.IsTrue(blockers.ContainsKey(new Vector2Int(-2, 2))); }