Ejemplo n.º 1
0
 private void MakeOccupiedFromAvailable(int current, ref GameObject gameObject)
 {
     --this.numOfAvailable;
     gameObject.IsOccupied = true;
     gameObject.Detach(current, ref this.firstAvailable, ref this.lastAvailable, this);
     gameObject.AttachTail(current, ref this.firstOccupied, ref this.lastOccupied, this);
 }
Ejemplo n.º 2
0
 private void MakeAvailableFromGarbage(int current, ref GameObject gameObject)
 {
     gameObject.IsAvailable = true;
     ++this.numOfAvailable;
     gameObject.Detach(current, ref this.firstGarbage, ref this.lastGarbage, this);
     gameObject.AttachTail(current, ref this.firstAvailable, ref this.lastAvailable, this);
 }
Ejemplo n.º 3
0
        private void MakeGarbageFromOccupied(int current, ref GameObject gameObject)
        {
            if (gameObject.IsMoved)
            {
                gameObject.IsMoved = false;
                gameObject.DetachFromMoved(current, ref this.firstMovedObject, ref this.lastMovedObject, this);
            }

            gameObject.IsGarbage = true;
            gameObject.Detach(current, ref this.firstOccupied, ref this.lastOccupied, this);
            gameObject.AttachTail(current, ref this.firstGarbage, ref this.lastGarbage, this);
        }
Ejemplo n.º 4
0
 private void InitGameObject(int current, ref GameObject gameObject)
 {
     gameObject.AttachTail(current, ref this.firstAvailable, ref this.lastAvailable, this);
     ++this.numOfAvailable;
     gameObject.Init();
 }