| 565 | } |
| 566 | |
| 567 | void GameObjectPool::DoRender()LNOEXCEPT |
| 568 | { |
| 569 | GETOBJTABLE; // ot |
| 570 | |
| 571 | GameObject* p = m_pRenderListHeader.pRenderNext; |
| 572 | LASSERT(p != nullptr); |
| 573 | while (p && p != &m_pRenderListTail) |
| 574 | { |
| 575 | if (!p->hide) // ֻ��Ⱦ�ɼ����� |
| 576 | { |
| 577 | // ����id��ȡ�����lua��table���õ�class���õ�renderfunc |
| 578 | lua_rawgeti(L, -1, p->id + 1); // ot t(object) |
| 579 | lua_rawgeti(L, -1, 1); // ot t(object) t(class) |
| 580 | lua_rawgeti(L, -1, LGOBJ_CC_RENDER); // ot t(object) t(class) f(render) |
| 581 | lua_pushvalue(L, -3); // ot t(object) t(class) f(render) t(object) |
| 582 | lua_call(L, 1, 0); // ot t(object) t(class) ִ����Ⱦ���� |
| 583 | lua_pop(L, 2); // ot |
| 584 | } |
| 585 | p = p->pRenderNext; |
| 586 | } |
| 587 | |
| 588 | lua_pop(L, 1); |
| 589 | } |
| 590 | |
| 591 | void GameObjectPool::BoundCheck()LNOEXCEPT |
| 592 | { |