Example #1
0
 /// <summary>
 /// 刷新缓存数据,重置世界
 /// </summary>
 ///
 public void Reset()
 {
     if (isClose)
     {
         return;
     }
     if (objects != null)
     {
         lock (objects)
         {
             if (objects != null)
             {
                 objects.Clear();
                 objects = null;
             }
             if (collisionChecker != null)
             {
                 collisionChecker.Clear();
                 collisionChecker = null;
             }
             this.collisionChecker = new CollisionManager();
             this.objects          = new ActorTreeSet();
         }
     }
 }
Example #2
0
 public ActorLayer(int x, int y, int layerWidth, int layerHeight,
                   int s, bool bounded)
     : base(x, y, layerWidth, layerHeight)
 {
     this.collisionChecker = new CollisionManager();
     this.objects          = new ActorTreeSet();
     this.cellSize         = s;
     this.Initialize(layerWidth, layerHeight, s);
     this.isBounded = bounded;
 }
Example #3
0
 public TasIterator(ActorTreeSet ats)
 {
     this.actorTreeSet = ats;
     this.Reset();
 }