leonardosc

Sprite example

Nov 18th, 2015
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 KB | None | 0 0
  1. using System.Drawing;
  2. using System.Windows.Forms;
  3. using GTA;
  4.  
  5. namespace ScriptHookVTests
  6. {
  7.     public class TestScript : Script
  8.     {
  9.         public TestScript()
  10.         {
  11.             var sprite = new UISprite("timerbars", "rockets", new Size(32, 32), new Point(UI.WIDTH / 2, UI.HEIGHT / 2));
  12.             var sprite2 = new UISprite("triathlon", "triathlon_swimming", new Size(32, 32), new Point(500, 500));
  13.             var sprite3 = new UISprite("srange_gen", "hit_cross", new Size(32, 32), new Point(500, 300)) {Color = Color.Blue};
  14.  
  15.  
  16.             Tick += (sender, args) =>
  17.             {
  18.                 sprite.Draw();
  19.                 sprite2.Draw();
  20.                 sprite2.Draw();
  21.                 sprite3.Draw();
  22.             };
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment