| 1339 | } |
| 1340 | |
| 1341 | int GameObjectPool::ParticleGetn(lua_State* L)LNOEXCEPT |
| 1342 | { |
| 1343 | if (!lua_istable(L, 1)) |
| 1344 | return luaL_error(L, "invalid lstg object for 'ParticleFire'."); |
| 1345 | lua_rawgeti(L, 1, 2); // t(object) ??? id |
| 1346 | size_t id = (size_t)luaL_checkinteger(L, -1); |
| 1347 | lua_pop(L, 1); |
| 1348 | |
| 1349 | GameObject* p = m_ObjectPool.Data(id); |
| 1350 | if (!p) |
| 1351 | return luaL_error(L, "invalid lstg object for 'ParticleFire'."); |
| 1352 | if (!p->res || p->res->GetType() != ResourceType::Particle) |
| 1353 | { |
| 1354 | lua_pushinteger(L, 0); |
| 1355 | return 1; |
| 1356 | } |
| 1357 | lua_pushinteger(L, (int)p->ps->GetAliveCount()); |
| 1358 | return 1; |
| 1359 | } |
| 1360 | |
| 1361 | int GameObjectPool::ParticleGetEmission(lua_State* L)LNOEXCEPT |
| 1362 | { |
nothing calls this directly
no test coverage detected