MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / NextObject

Method NextObject

LuaSTGPlus/GameObjectPool.cpp:953–981  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

951}
952
953int GameObjectPool::NextObject(int groupId, int id)LNOEXCEPT
954{
955 if (id < 0)
956 return -1;
957
958 GameObject* p = m_ObjectPool.Data(static_cast<size_t>(id));
959 if (!p)
960 return -1;
961
962 // �������һ����Ч�ķ��飬��������������б���
963 if (groupId < 0 || groupId >= LGOBJ_GROUPCNT)
964 {
965 p = p->pObjectNext;
966 if (p == &m_pObjectListTail)
967 return -1;
968 else
969 return static_cast<int>(p->id);
970 }
971 else
972 {
973 if (p->group != groupId)
974 return -1;
975 p = p->pCollisionNext;
976 if (p == &m_pCollisionListTail[groupId])
977 return -1;
978 else
979 return static_cast<int>(p->id);
980 }
981}
982
983int GameObjectPool::NextObject(lua_State* L)LNOEXCEPT
984{

Callers

nothing calls this directly

Calls 1

DataMethod · 0.80

Tested by

no test coverage detected