| 1319 | } |
| 1320 | |
| 1321 | int GameObjectPool::ParticleFire(lua_State* L)LNOEXCEPT |
| 1322 | { |
| 1323 | if (!lua_istable(L, 1)) |
| 1324 | return luaL_error(L, "invalid lstg object for 'ParticleFire'."); |
| 1325 | lua_rawgeti(L, 1, 2); // t(object) ??? id |
| 1326 | size_t id = (size_t)luaL_checkinteger(L, -1); |
| 1327 | lua_pop(L, 1); |
| 1328 | |
| 1329 | GameObject* p = m_ObjectPool.Data(id); |
| 1330 | if (!p) |
| 1331 | return luaL_error(L, "invalid lstg object for 'ParticleFire'."); |
| 1332 | if (!p->res || p->res->GetType() != ResourceType::Particle) |
| 1333 | { |
| 1334 | LWARNING("ParticleFire: ��ͼ����һ�����������ӷ������Ķ�������ӷ������(uid=%d)", m_iUid); |
| 1335 | return 0; |
| 1336 | } |
| 1337 | p->ps->SetActive(); |
| 1338 | return 0; |
| 1339 | } |
| 1340 | |
| 1341 | int GameObjectPool::ParticleGetn(lua_State* L)LNOEXCEPT |
| 1342 | { |