Пример #1
0
 public override void Draw(DrawBatch drawBatch)
 {
     sprite.Draw(drawBatch, DrawBatch.DrawCall.Tag.GameObject, PositionXY + new Vector2(0), 0f, new Vector2(16, 16), new Vector2(.5f), Color.Lerp(Color.Black, Color.Transparent, .5f), DrawBatch.CalculateDepth(PositionXY));
     if (nextFrameRed)
     {
         sprite.Draw(drawBatch, DrawBatch.DrawCall.Tag.GameObject, PositionXY + new Vector2(0, -position.Z), MovementXY.GetAngle(), new Vector2(16, 16), new Vector2(.5f), Color.Red, DrawBatch.CalculateDepth(PositionXY));
         nextFrameRed = false;
     }
     else
     {
         sprite.Draw(drawBatch, DrawBatch.DrawCall.Tag.GameObject, PositionXY + new Vector2(0, -position.Z), MovementXY.GetAngle(), new Vector2(16, 16), .5f, DrawBatch.CalculateDepth(PositionXY));
     }
 }
Пример #2
0
            public override void Draw(DrawBatch drawBatch)
            {
                float flack = (float)Math.Cos(timeAlive / 4.3f);

                //sprite.Draw(drawBatch, DrawBatch.DrawCall.Tag.GameObject, PositionXY + new Vector2(0), MovementXY.GetAngle(), new Vector2(56, 16), new Vector2(.5f), Color.Lerp(Color.Black, Color.Transparent, .5f), DrawBatch.CalculateDepth(PositionXY));
                sprite.Draw(drawBatch, DrawBatch.DrawCall.Tag.GameObject, PositionXY + new Vector2(0, -position.Z), MovementXY.GetAngle(), new Vector2(56, 16), DrawBatch.CalculateDepth(PositionXY));

                drawBatch.Draw(DrawBatch.DrawCall.Tag.Light, Game1.fader, PositionXY + new Vector2(0, -position.Z), Extensions.LerpFloat(.3f, .6f, flack * flack), 0f, new Vector2(Game1.fader.Width / 2, Game1.fader.Height / 2), Color.Lerp(Color.OrangeRed, new Color(240, 220, 0), .1f + flack * .8f), DrawBatch.CalculateDepth(PositionXY) + .0001f);
                drawBatch.Draw(DrawBatch.DrawCall.Tag.Light, Game1.fader, PositionXY + new Vector2(0, -position.Z), .6f, 0f, new Vector2(Game1.fader.Width / 2, Game1.fader.Height / 2), Color.Lerp(Color.LightGoldenrodYellow, Color.Black, .4f), DrawBatch.CalculateDepth(PositionXY) + .0001f);
            }