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