Exemple #1
0
        public Particle(Action <Particle> killCallBack, BasicEmitter emitter) : base()
        {
            Particle.random   = new Random();
            this.KillCallBack = killCallBack;
            this.Emitter      = emitter;
            this.Lifetime     = 0;
            this.Modifiers    = new LinkedList <IParticleModifier>();
            this.Deactivate();
            this.Origin          = new Vector2(this.Emitter.Data.BaseTexture.Width / 2, this.Emitter.Data.BaseTexture.Height / 2);
            this.SourceRectangle = new Rectangle(0, 0, this.Emitter.Data.BaseTexture.Width, this.Emitter.Data.BaseTexture.Height);

            this.InitializeModifiers();
        }
Exemple #2
0
        public Particle(Action<Particle> killCallBack, BasicEmitter emitter)
            : base()
        {
            this.KillCallBack = killCallBack;
            this.Emitter = emitter;
            this.Lifetime = 0;
            this.Modifiers = new LinkedList<IParticleModifier>();
            this.Deactivate();
            this.Origin = new Vector2(this.Emitter.Data.BaseTexture.Width / 2, this.Emitter.Data.BaseTexture.Height / 2);
            this.OffScreenAction = OffScreenAction.NONE;
            this.SourceRectangle = new Rectangle(0, 0, this.Emitter.Data.BaseTexture.Width, this.Emitter.Data.BaseTexture.Height);

            this.InitializeModifiers();
        }