Exemplo n.º 1
0
 public void EmitParticleWithDisplayEntity(DisplayEntity displayEntity)
 {
     foreach (Particle particle in particles)
     {
         if (!particle.Active)
         {
             particle.ActivateWithDisplayEntity(displayEntity, particleLifetime, true, true, 0.6f, 0.7f);
             break;
         }
     }
 }
Exemplo n.º 2
0
 public void EmitParticleWithDisplayEntity(DisplayEntity displayEntity)
 {
     foreach (Particle particle in particles)
     {
         if (!particle.Active)
         {
             particle.ActivateWithDisplayEntity(displayEntity, particleLifetime, true, true, 0.6f, 0.7f);
             break;
         }
     }
 }
Exemplo n.º 3
0
        public void ActivateWithDisplayEntity(DisplayEntity displayEntity, float lifetime, bool fadeAway, bool alphaAway, float initialOpacity, float initialAlpha)
        {
            this.Active = true;
            lifeTimer.SetDelay(lifetime);
            this.fadeAway       = fadeAway;
            this.alphaAway      = alphaAway;
            this.initialOpacity = initialOpacity;
            this.initialAlpha   = initialAlpha;

            // Extract drawing information from the display entity
            SpriteSheet   = displayEntity.SpriteSheet;
            SourceRect    = displayEntity.SourceRect;
            Position      = displayEntity.Position;
            Scale         = displayEntity.Scale;
            Color         = displayEntity.Color;
            Rotation      = displayEntity.Rotation;
            SpriteEffects = displayEntity.SpriteEffects;
            LayerDepth    = displayEntity.LayerDepth + 0.001f;
            Width         = SourceRect.Width;
            Height        = SourceRect.Height;
            origin        = new Vector2(Width * 0.5f, Height * 0.5f);
        }
Exemplo n.º 4
0
        public void ActivateWithDisplayEntity(DisplayEntity displayEntity, float lifetime, bool fadeAway, bool alphaAway, float initialOpacity, float initialAlpha)
        {
            this.Active = true;
            lifeTimer.SetDelay(lifetime);
            this.fadeAway = fadeAway;
            this.alphaAway = alphaAway;
            this.initialOpacity = initialOpacity;
            this.initialAlpha = initialAlpha;

            // Extract drawing information from the display entity
            SpriteSheet = displayEntity.SpriteSheet;
            SourceRect = displayEntity.SourceRect;
            Position = displayEntity.Position;
            Scale = displayEntity.Scale;
            Color = displayEntity.Color;
            Rotation = displayEntity.Rotation;
            SpriteEffects = displayEntity.SpriteEffects;
            LayerDepth = displayEntity.LayerDepth +0.001f;
            Width = SourceRect.Width;
            Height = SourceRect.Height;
            origin = new Vector2(Width * 0.5f, Height * 0.5f);
        }
Exemplo n.º 5
0
 public void ActivateWithDisplayEntity(DisplayEntity displayEntity, float lifetime, bool fadeAway, bool alphaAway)
 {
     ActivateWithDisplayEntity(displayEntity, lifetime, fadeAway, alphaAway, 1f, 1f);
 }
Exemplo n.º 6
0
 public void ActivateWithDisplayEntity(DisplayEntity displayEntity, float lifetime)
 {
     ActivateWithDisplayEntity(displayEntity, lifetime, false, false, 1f, 1f);
 }
Exemplo n.º 7
0
 public void ActivateWithDisplayEntity(DisplayEntity displayEntity, float lifetime, bool fadeAway, bool alphaAway)
 {
     ActivateWithDisplayEntity(displayEntity, lifetime, fadeAway, alphaAway, 1f, 1f);
 }
Exemplo n.º 8
0
 public void ActivateWithDisplayEntity(DisplayEntity displayEntity, float lifetime)
 {
     ActivateWithDisplayEntity(displayEntity, lifetime, false, false, 1f, 1f);
 }