public override void Render(Emitter emisor)
 {
     base.Render(emisor);
     //Se disminuye el alpha para simular efecto de dispersion
     if (this.Alpha > 5)
         this.Alpha -= 5;
     else if (this.Alpha > 0)
         this.Alpha--;
 }
 public override void Update_Modifiers(Emitter emisor)
 {
     ExplosionEmitter e = (ExplosionEmitter)emisor;
     if (e.SizeSpeed != this.SizeSpeed)
     {
         this.SizeSpeed = e.SizeSpeed;
     }
     base.Update_Modifiers(emisor);
 }
 public override void Render(Emitter emisor)
 {
     base.Render(emisor);
     if (this.Spawn > 0.0005f)
     {
         if (Alpha > 0)
             this.Alpha--;
         this.Spawn = 0f;
     }
     this.Agrandar(emisor);
 }
        public override void Update_Modifiers(Emitter emisor)
        {
            if (this.InitialPos != emisor.InitCoords)
            {
                this.CurrentPos += (emisor.InitCoords - this.InitialPos);
                this.InitialPos = emisor.InitCoords;
            }

            if (this.TimeToLive != (emisor.InitCoords.Y - emisor.TimeToLive_Particle))
            {
                this.TimeToLive = (emisor.InitCoords.Y - emisor.TimeToLive_Particle);
            }
        }
        public override void Update_Modifiers(Emitter emisor)
        {
            if (this.InitialPos != emisor.InitCoords)
            {
                this.CurrentPos += (emisor.InitCoords - this.InitialPos);
                this.InitialPos = emisor.InitCoords;
            }

            if (emisor.Speed != this.Speed)
            {
                this.Speed = emisor.Speed;
            }
        }
        public override void Render(Emitter emisor)
        {
            this.Update_Modifiers(emisor);
            this.Agrandar(emisor);
            base.Render(emisor);
            ExplosionEmitter e = (ExplosionEmitter) emisor;
            if (this.Spawn > 0.01f)
            {
                if (this.Alpha > e.AlphaDecr)
                {
                    this.Alpha -= e.AlphaDecr;
                }
                else
                {
                    if (Alpha > 0)
                        this.Alpha--;
                }

                this.Spawn = 0f;
            }
        }
        //Actualizo velocidad, divergencia, posicion y tiempo de vida
        public virtual void Update_Modifiers(Emitter emisor)
        {
            if (emisor.Speed != this.Speed)
            {
                this.Speed = emisor.Speed;
            }

            if (emisor.TimeToLive_Particle != this.TimeToLive)
            {
                this.TimeToLive = emisor.TimeToLive_Particle;
            }

            if (this.InitialPos != emisor.InitCoords)
            {
                this.CurrentPos += (emisor.InitCoords - this.InitialPos);
                this.InitialPos = emisor.InitCoords;
            }
        }
        public virtual void Render(Emitter emisor)
        {
            this.Active = true;
            this.Update_Modifiers(emisor);
            float x = this.Mover(this.CurrentPos.X,this.Direction.X,this.Speed.X,this.Acceleration.X);
            float y = this.Mover(this.CurrentPos.Y, this.Direction.Y, this.Speed.Y, this.Acceleration.Y);
            float z = this.Mover(this.CurrentPos.Z, this.Direction.Z, this.Speed.Z, this.Acceleration.Z);

            this.CurrentPos = new Vector3(x,y,z);
        }
 public virtual void Matar(Emitter emisor)
 {
     this.CurrentPos = emisor.DameCoordenadasEmision();
     this.Alpha = emisor.InitialAlpha;
     this.LifeTime = 0f;
     this.Spawn = 0f;
     this.Active = false;
 }
 //Se agranda la particula de acuerdo a la velocidad de tamaño
 private void Agrandar(Emitter emisor)
 {
     GotaEmitter e = (GotaEmitter)emisor;
     if ((this.Size + e.SizeSpeed * this.LifeTime) <= emisor.PointSizeMax)
         this.Size += e.SizeSpeed * this.LifeTime;
 }
 public override void Render(Emitter emisor)
 {
     this.Agrandar(emisor);
     base.Render(emisor);
 }
 public override void Matar(Emitter emisor)
 {
     base.Matar(emisor);
     this.Size = emisor.PointSizeMin;
 }
 //Se agranda la particula de acuerdo al SizeSpeed
 private void Agrandar(Emitter emisor)
 {
     if ((this.Size + this.SizeSpeed * this.LifeTime) <= emisor.PointSizeMax)
         this.Size += this.SizeSpeed * this.LifeTime;
 }
 public override void Matar(Emitter emisor)
 {
     base.Matar(emisor);
     //Vuelve al tamaño inicial
     this.Size = emisor.PointSizeMin;
 }
Exemple #15
0
 public override void Matar(Emitter emisor)
 {
     base.Matar(emisor);
     //Vuelve al tamaño inicial
     this.Size = emisor.PointSizeMin;
 }