Guest User

Untitled

a guest
Jul 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.78 KB | None | 0 0
  1. public void PostDraw(SpriteBatch s) {
  2.     if (cd != 0)
  3.         cd --;
  4.    
  5.     if ((Main.mouseState.LeftButton == Microsoft.Xna.Framework.Input.ButtonState.Pressed)  && (cd == 0)) {
  6.         cd = 20;
  7.         pathing.AddNode(new Vector2((float)Main.mouseX + Main.screenPosition.X, (float)Main.mouseY + Main.screenPosition.Y));
  8.     }
  9.    
  10.     Texture2D tex = Main.goreTexture[Config.goreID["NodeTest"]];
  11.     for (float i = 0; i < pathing.GetSize(); i+=0.025f) {
  12.         Vector2 position = pathing.GetPosition(i);
  13.         s.Draw(
  14.             tex,
  15.             new Vector2(
  16.                 position.X - Main.screenPosition.X,
  17.                 position.Y - Main.screenPosition.Y
  18.             ),
  19.             new Rectangle?(
  20.                 new Rectangle(
  21.                     0, 0,
  22.                     25, 24
  23.                 )
  24.             ),
  25.             Color.White,
  26.             0.0f,
  27.             new Vector2(
  28.                 0, 0
  29.             ),
  30.             1.0f,
  31.             SpriteEffects.None,
  32.             0f
  33.         );
  34.     }
  35. }
Add Comment
Please, Sign In to add comment