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

Method ParticleGetEmission

LuaSTGPlus/GameObjectPool.cpp:1361–1380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1359}
1360
1361int 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
1382int GameObjectPool::ParticleSetEmission(lua_State* L)LNOEXCEPT
1383{

Callers

nothing calls this directly

Calls 3

DataMethod · 0.80
GetTypeMethod · 0.80
GetEmissionMethod · 0.80

Tested by

no test coverage detected