void ToolbarPanel::InitParticle() { Clear(); auto cfg = PSConfigMgr::Instance()->GetDefaultConfig(); ParticleSystem* ps = new ParticleSystem(cfg, false); // ps->Start(); cu::RefCountObjAssign<ParticleSystem>(m_stage->m_ps, ps); for (int i = 0, n = m_sliders.size(); i < n; ++i) { m_sliders[i]->Update(); } ps->SetHori(m_min_hori->GetValue(), m_max_hori->GetValue()); ps->SetVert(m_min_vert->GetValue(), m_max_vert->GetValue()); ps->SetGround(m_ground->GetSelection()); }