動(dòng)態(tài)改變粒子系統(tǒng)的速度[Unity]
void LateUpdate ()
{
ParticleSystem.Particle[] particles =?new?ParticleSystem.Particle[particleSystem.particleCount];
int?count = particleSystem.GetParticles(particles);
for(int?i = 0; i < count; i++)
{
particles[i].velocity =?new?Vector3(0, speed, 0);
}
particleSystem.SetParticles(particles, count);
}
標(biāo)簽: