Exemplo n.º 1
0
 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);
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
        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);
            }
        }
Exemplo n.º 5
0
        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;
            }
        }
Exemplo n.º 7
0
        //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;
            }
        }
Exemplo n.º 8
0
        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);
        }
Exemplo n.º 9
0
 public virtual void Matar(Emitter emisor)
 {
     this.CurrentPos = emisor.DameCoordenadasEmision();
     this.Alpha = emisor.InitialAlpha;
     this.LifeTime = 0f;
     this.Spawn = 0f;
     this.Active = false;
 }
Exemplo n.º 10
0
 //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;
 }
Exemplo n.º 11
0
 public override void Render(Emitter emisor)
 {
     this.Agrandar(emisor);
     base.Render(emisor);
 }
Exemplo n.º 12
0
 public override void Matar(Emitter emisor)
 {
     base.Matar(emisor);
     this.Size = emisor.PointSizeMin;
 }
Exemplo n.º 13
0
 //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;
 }
Exemplo n.º 14
0
 public override void Matar(Emitter emisor)
 {
     base.Matar(emisor);
     //Vuelve al tamaño inicial
     this.Size = emisor.PointSizeMin;
 }
Exemplo n.º 15
0
 public override void Matar(Emitter emisor)
 {
     base.Matar(emisor);
     //Vuelve al tamaño inicial
     this.Size = emisor.PointSizeMin;
 }