예제 #1
0
        /// <summary>
        /// Default constructor. Initializes the pool and all collections contained in the <see cref="ParticleEmitter"/>
        /// </summary>
        public ParticleEmitter()
        {
            pool = new ParticlePool(0, 0);
            PoolChangedNotification();
            requiredFields = new Dictionary <ParticleFieldDescription, int>();

            // For now all particles require Life and RandomSeed fields, always
            AddRequiredField(ParticleFields.RemainingLife);
            AddRequiredField(ParticleFields.RandomSeed);
            AddRequiredField(ParticleFields.Position);

            initialDefaultFields = new InitialDefaultFields();

            Initializers = new FastTrackingCollection <ParticleInitializer>();
            Initializers.CollectionChanged += ModulesChanged;

            Updaters = new FastTrackingCollection <ParticleUpdater>();
            Updaters.CollectionChanged += ModulesChanged;

            Spawners = new FastTrackingCollection <ParticleSpawner>();
            Spawners.CollectionChanged += SpawnersChanged;
        }
예제 #2
0
 public ParticlePoolFieldsList(ParticlePool pool)
 {
     particlePool = pool;
 }