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

Method ParticleSetEmission

LuaSTGPlus/GameObjectPool.cpp:1382–1400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1380}
1381
1382int GameObjectPool::ParticleSetEmission(lua_State* L)LNOEXCEPT
1383{
1384 if (!lua_istable(L, 1))
1385 return luaL_error(L, "invalid lstg object for 'ParticleGetEmission'.");
1386 lua_rawgeti(L, 1, 2); // t(object) ??? id
1387 size_t id = (size_t)luaL_checkinteger(L, -1);
1388 lua_pop(L, 1);
1389
1390 GameObject* p = m_ObjectPool.Data(id);
1391 if (!p)
1392 return luaL_error(L, "invalid lstg object for 'ParticleGetEmission'.");
1393 if (!p->res || p->res->GetType() != ResourceType::Particle)
1394 {
1395 LWARNING("ParticleSetEmission: ��ͼ����һ�����������ӷ������Ķ�������ӷ����ܶ�(uid=%d)", m_iUid);
1396 return 0;
1397 }
1398 p->ps->SetEmission((float)::max(0., luaL_checknumber(L, 2)));
1399 return 0;
1400}
1401
1402void GameObjectPool::DrawGroupCollider(f2dGraphics2D* graph, f2dGeometryRenderer* grender, int groupId, fcyColor fillColor)
1403{

Callers

nothing calls this directly

Calls 3

DataMethod · 0.80
GetTypeMethod · 0.80
SetEmissionMethod · 0.80

Tested by

no test coverage detected