int GetIndex(Distribution distribution, Particles particles, int count, int index) { switch (distribution) { case Distribution.Random: return(randomIndexes[index]); default: return(index); } }
int GetIncrement(Distribution distribution, Particles particles, int count) { switch (distribution) { case Distribution.Linear: return(m_separation); case Distribution.Spread: return(Mathf.CeilToInt((float)particles.ParticleList.Length / (float)count)); default: return(1); } }
void SetUpIncrement(Distribution distribution, Particles particles, int count) { switch (distribution) { case Distribution.Random: if (particles.Prefab != null) { Random.seed = particles.Prefab.Seed; } randomIndexes = Enumerable.Range(0, particles.ParticleList.Length).OrderBy(r => Random.Next()).ToList(); break; } }
internal void RemoveParticles(Particles item) { particles?.Remove(item); }
public List <Particle> Find(Particles particles, Distribution distribution, int count) { return(Find(particles, DefaultChooser, distribution, count)); }
protected virtual void OnGalaxyPreRender(Particles particles, Galaxy.RenderEvent eEvent) { eEvent.Used = true; }