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

Method ParticleFire

LuaSTGPlus/GameObjectPool.cpp:1321–1339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1319}
1320
1321int 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
1341int GameObjectPool::ParticleGetn(lua_State* L)LNOEXCEPT
1342{

Callers

nothing calls this directly

Calls 3

DataMethod · 0.80
GetTypeMethod · 0.80
SetActiveMethod · 0.80

Tested by

no test coverage detected