Esempio 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);
 }
Esempio 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);
 }
Esempio 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);
        }
Esempio 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();
 }