public void addBodyToDestroy(Body b) { BodyNode bodyNode = new BodyNode(b); if (destroyHead == null) { destroyHead = bodyNode; bodyNode.next = null; bodyNode.prev = null; } else { bodyNode.next = destroyHead; destroyHead.prev = bodyNode; destroyHead = bodyNode; } }
private GameObjManager() { destroyHead = null; objNumberCounter = 0; }
public void destroyBodies(World w) { BodyNode ptr = destroyHead; while (ptr != null) { w.DestroyBody(ptr.body); ptr = ptr.next; } destroyHead = null; }
public void Set(Body _body) { this.next = null; this.prev = null; this.body = _body; }
public BodyNode(Body _body) { this.next = null; this.prev = null; this.body = _body; }