Пример #1
0
        public void CanClearAutoDictionary()
        {
            AutoDictionary <string, bool> tested = new AutoDictionary <string, bool>()
            {
                { "hello", true },
                { "world", true }
            };

            tested.Clear();
            Assert.AreEqual(0, tested.Count);
            Assert.AreEqual(false, tested["hello"]);
            Assert.AreEqual(false, tested.ContainsKey("hello"));
            Assert.AreEqual(false, tested["world"]);
        }
Пример #2
0
 public void SetTile(Point point, int dis, int tile)
 {
     foreach (var memMapPoint in Cells)
     {
         if (BattleLocationManager.IsPointInRegionType(RegionTypes.Circle, point.X, point.Y, memMapPoint.ToPoint(), dis, true))//地形和方向无关,随便填一个
         {
             memMapPoint.Tile = tile;
         }
     }
     tiles.Clear();
     foreach (var memMapPoint in Cells)
     {
         tiles[memMapPoint.Tile == 9 ? 0 : memMapPoint.Tile]++;
     }
     isDirty = true;
 }
Пример #3
0
 public void Clear() => inner.Clear();
Пример #4
0
 public void Reset()
 {
     myInputDictionary.Clear();
     myOutputDictionary.Clear();
 }