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;
        }
Example #4
0
 public void Set(Body _body)
 {
     this.next = null;
     this.prev = null;
     this.body = _body;
 }
Example #5
0
 public BodyNode(Body _body)
 {
     this.next = null;
     this.prev = null;
     this.body = _body;
 }
Example #6
0
 public void Set(Body _body)
 {
     this.next = null;
     this.prev = null;
     this.body = _body;
 }
Example #7
0
 public BodyNode(Body _body)
 {
     this.next = null;
     this.prev = null;
     this.body = _body;
 }