Ejemplo n.º 1
0
 public void Draw(Camera2D cam, Color color)
 {
     if (SpriteSize.IsZero())//애니메이션이 없을 경우
     {
         Game1.spriteBatch.Begin(SpriteSortMode.BackToFront,
                                 BlendState.AlphaBlend,
                                 null,
                                 null,
                                 null,
                                 null,
                                 cam.get_transformation(Game1.graphics.GraphicsDevice /*Send the variable that has your graphic device here*/));
         Game1.spriteBatch.Draw(spriteTexture, Bound, color);
         Game1.spriteBatch.End();
         return;
     }
     Game1.spriteBatch.Begin(SpriteSortMode.BackToFront,
                             BlendState.AlphaBlend,
                             null,
                             null,
                             null,
                             null,
                             cam.get_transformation(Game1.graphics.GraphicsDevice /*Send the variable that has your graphic device here*/));
     Game1.spriteBatch.Draw(spriteTexture, Bound, ProcessedSourceRect(), color);
     Game1.spriteBatch.End();
 }
Ejemplo n.º 2
0
 public static void DrawString(Camera2D cam, string s, DrawingLayer d, Vector2 vector2, Color color)
 {
     Game1.spriteBatch.Begin(SpriteSortMode.BackToFront,
                             BlendState.AlphaBlend,
                             null,
                             null,
                             null,
                             null,
                             cam.get_transformation(Game1.graphics.GraphicsDevice /*Send the variable that has your graphic device here*/));
     Game1.spriteBatch.DrawString(Standardfont, s, vector2 + new Vector2(d.GetPos().X, d.GetPos().Y), color);
     Game1.spriteBatch.End();
 }
Ejemplo n.º 3
0
 public static void DrawChunk(Action DrawInstructions)
 {
     Game1.spriteBatch.Begin(SpriteSortMode.BackToFront,
                             BlendState.AlphaBlend,
                             null,
                             null,
                             null,
                             null,
                             MainCamera.get_transformation(Game1.graphics.GraphicsDevice /*Send the variable that has your graphic device here*/));
     DrawInstructions();
     Game1.spriteBatch.End();
     return;
 }
Ejemplo n.º 4
0
 public static void DrawString(Camera2D cam, string FontName, string s, Vector2 vector2, Color color)
 {
     Temporaryfont = Game1.content.Load <SpriteFont>(FontName);
     Game1.spriteBatch.Begin(SpriteSortMode.BackToFront,
                             BlendState.AlphaBlend,
                             null,
                             null,
                             null,
                             null,
                             cam.get_transformation(Game1.graphics.GraphicsDevice /*Send the variable that has your graphic device here*/));
     Game1.spriteBatch.DrawString(Temporaryfont, s, vector2, color);
     Game1.spriteBatch.End();
 }