| 1359 | } |
| 1360 | |
| 1361 | int GameObjectPool::ParticleGetEmission(lua_State* L)LNOEXCEPT |
| 1362 | { |
| 1363 | if (!lua_istable(L, 1)) |
| 1364 | return luaL_error(L, "invalid lstg object for 'ParticleGetEmission'."); |
| 1365 | lua_rawgeti(L, 1, 2); // t(object) ??? id |
| 1366 | size_t id = (size_t)luaL_checkinteger(L, -1); |
| 1367 | lua_pop(L, 1); |
| 1368 | |
| 1369 | GameObject* p = m_ObjectPool.Data(id); |
| 1370 | if (!p) |
| 1371 | return luaL_error(L, "invalid lstg object for 'ParticleGetEmission'."); |
| 1372 | if (!p->res || p->res->GetType() != ResourceType::Particle) |
| 1373 | { |
| 1374 | LWARNING("ParticleGetEmission: ��ͼ��ȡһ�����������ӷ������Ķ�������ӷ����ܶ�(uid=%d)", m_iUid); |
| 1375 | lua_pushinteger(L, 0); |
| 1376 | return 1; |
| 1377 | } |
| 1378 | lua_pushnumber(L, p->ps->GetEmission()); |
| 1379 | return 1; |
| 1380 | } |
| 1381 | |
| 1382 | int GameObjectPool::ParticleSetEmission(lua_State* L)LNOEXCEPT |
| 1383 | { |
nothing calls this directly
no test coverage detected