예제 #1
0
파일: PointEmitter.cs 프로젝트: rc183/igf
        /// <summary>
        /// Copies the properties of this instance into the specified existing instance.
        /// </summary>
        /// <param name="exisitingInstance">An existing emitter instance.</param>
        protected override AbstractEmitter DeepCopy(AbstractEmitter exisitingInstance)
        {
            PointEmitter value = (exisitingInstance as PointEmitter) ?? new PointEmitter();

            base.DeepCopy(value);

            return(value);
        }
예제 #2
0
파일: Core.cs 프로젝트: kishoreVen/mpe
        /// <summary>
        /// Instantiates the default particle effect.
        /// </summary>
        private ParticleEffect InstantiateDefaultParticleEffect()
        {
            Trace.WriteLine("Instantiating default particle effect...", "CORE");

            ParticleEffect effect = new ParticleEffect();
            AbstractEmitter emiter = new PointEmitter
                {
                    Budget = 5000,
                    Enabled = true,
                    //MinimumTriggerPeriod     = 0f,
                    Name = "Basic Emitter",
                    ParticleTexture = this.DefaultParticleTexture,
                    //ParticleTextureAssetName = "FlowerBurst",
                    ReleaseColour = Color.White.ToVector3(),
                    ReleaseOpacity = 1f,
                    ReleaseQuantity = 10,
                    ReleaseScale = new Range(24f, 40f), // {  Value = 32f, Variation = 16f },
                    ReleaseSpeed = new Range(12f, 37f), // { Value = 25f, Variation = 25f },
                    Term = 1f,
                    Modifiers = new ModifierCollection(),
                    Controllers = new ControllerPipeline()
                };
            emiter.Initialise();
            effect.Emitters.Add(emiter);
            return effect;
        }