Exemple #1
0
        int GetIndex(Distribution distribution, Particles particles, int count, int index)
        {
            switch (distribution)
            {
            case Distribution.Random:
                return(randomIndexes[index]);

            default:
                return(index);
            }
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
        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;
            }
        }
Exemple #4
0
 internal void RemoveParticles(Particles item)
 {
     particles?.Remove(item);
 }
Exemple #5
0
 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;
 }