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

Method ParticleStop

LuaSTGPlus/GameObjectPool.cpp:1301–1319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1299}
1300
1301int GameObjectPool::ParticleStop(lua_State* L)LNOEXCEPT
1302{
1303 if (!lua_istable(L, 1))
1304 return luaL_error(L, "invalid lstg object for 'ParticleStop'.");
1305 lua_rawgeti(L, 1, 2); // t(object) ??? id
1306 size_t id = (size_t)luaL_checkinteger(L, -1);
1307 lua_pop(L, 1);
1308
1309 GameObject* p = m_ObjectPool.Data(id);
1310 if (!p)
1311 return luaL_error(L, "invalid lstg object for 'ParticleStop'.");
1312 if (!p->res || p->res->GetType() != ResourceType::Particle)
1313 {
1314 LWARNING("ParticleStop: ��ͼֹͣһ�����������ӷ������Ķ�������ӷ������(uid=%d)", m_iUid);
1315 return 0;
1316 }
1317 p->ps->SetInactive();
1318 return 0;
1319}
1320
1321int GameObjectPool::ParticleFire(lua_State* L)LNOEXCEPT
1322{

Callers

nothing calls this directly

Calls 3

DataMethod · 0.80
GetTypeMethod · 0.80
SetInactiveMethod · 0.80

Tested by

no test coverage detected