コード例 #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;
         }
     }
 }
コード例 #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;
         }
     }
 }
コード例 #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);
        }
コード例 #4
0
ファイル: Particle.cs プロジェクト: psykano/STFU-xna
        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);
        }
コード例 #5
0
 public void ActivateWithDisplayEntity(DisplayEntity displayEntity, float lifetime, bool fadeAway, bool alphaAway)
 {
     ActivateWithDisplayEntity(displayEntity, lifetime, fadeAway, alphaAway, 1f, 1f);
 }
コード例 #6
0
 public void ActivateWithDisplayEntity(DisplayEntity displayEntity, float lifetime)
 {
     ActivateWithDisplayEntity(displayEntity, lifetime, false, false, 1f, 1f);
 }
コード例 #7
0
ファイル: Particle.cs プロジェクト: psykano/STFU-xna
 public void ActivateWithDisplayEntity(DisplayEntity displayEntity, float lifetime, bool fadeAway, bool alphaAway)
 {
     ActivateWithDisplayEntity(displayEntity, lifetime, fadeAway, alphaAway, 1f, 1f);
 }
コード例 #8
0
ファイル: Particle.cs プロジェクト: psykano/STFU-xna
 public void ActivateWithDisplayEntity(DisplayEntity displayEntity, float lifetime)
 {
     ActivateWithDisplayEntity(displayEntity, lifetime, false, false, 1f, 1f);
 }