Exemple #1
0
        public void ClearNonAlloc()
        {
            // add some
            grid.Add(Vector2Int.zero, 1);
            grid.Add(Vector2Int.zero, 2);

            // clear and check if empty now
            grid.ClearNonAlloc();
            HashSet <int> result = new HashSet <int>();

            grid.GetWithNeighbours(Vector2Int.zero, result);
            Assert.That(result.Count, Is.EqualTo(0));
        }