Ejemplo n.º 1
0
        public void Draw(CustomSpriteBatch g)
        {
            foreach (SimpleAnimation ActiveAnimation in ListVisualEffects)
            {
                ActiveAnimation.Draw(g);
            }

            foreach (SimpleAnimation ActiveAnimation in ListImages)
            {
                ActiveAnimation.Draw(g);
            }

            foreach (AttackBox ActiveCollision in ListAttackCollisionBox)
            {
                if (!ActiveCollision.IsAlive)
                {
                    continue;
                }

                ActiveCollision.DrawRegular(g);
            }

            foreach (Prop ActiveProp in ListProp)
            {
                ActiveProp.Draw(g);
            }
        }
Ejemplo n.º 2
0
 public override void Draw(CustomSpriteBatch g, Vector2 Position)
 {
     if (IsAnimated)
     {
         ActiveAnimation.TransformationMatrix = Matrix.CreateTranslation(-ActiveAnimation.AnimationOrigin.Position.X, -ActiveAnimation.AnimationOrigin.Position.Y, 0)
                                                * Matrix.CreateRotationZ(Angle)
                                                * Matrix.CreateScale(Scale.X, Scale.Y, 1f)
                                                * Matrix.CreateTranslation(Position.X,
                                                                           Position.Y, 0);
         ActiveAnimation.Draw(g);
     }
     else if (StaticSprite != null)
     {
         g.Draw(StaticSprite, Position, new Rectangle(0, 0, StaticSprite.Width, StaticSprite.Height), Color.FromNonPremultiplied(255, 255, 255, 127), Angle, Origin, AbsoluteScale, ScaleEffect, Depth);
     }
     else
     {
         ActualSprite.Draw(g, Position, Color.FromNonPremultiplied(255, 255, 255, (int)(TimeAliveInSecondsRemaining / TimeAliveInSeconds * 127)), Angle, Depth);
     }
 }