예제 #1
0
 /// <summary>
 /// Create a new SpriteClickEventArgs, specifying a position and sprite.
 /// </summary>
 /// <param name="x">The X position of the click.</param>
 /// <param name="y">The Y position of the click.</param>
 /// <param name="spr">The sprite that was clicked on.</param>
 /// <param name="manager">Whether or not this event is being called by a SpriteManager.</param>
 public SpriteClickEventArgs(Glib.XNA.SpriteLib.Sprite spr, int x, int y, bool manager)
 {
     this.Sprite          = spr;
     this.X               = x;
     this.CalledByManager = manager;
     this.Y               = y;
 }
예제 #2
0
 /// <summary>
 /// Draw the specified Sprite to this SpriteBatch.
 /// </summary>
 /// <param name="sb">The SpriteBatch to draw to.</param>
 /// <param name="sprToDraw">The sprite to draw.</param>
 public static void Draw(this SpriteBatch sb, Glib.XNA.SpriteLib.Sprite sprToDraw)
 {
     if (sprToDraw.Visible)
     {
         sb.Draw(sprToDraw.Texture, sprToDraw.Position, sprToDraw.DrawRegion, sprToDraw.TintColor, sprToDraw.Rotation.Radians, sprToDraw.Origin, sprToDraw.Scale, sprToDraw.Effect, sprToDraw.LayerDepth);
     }
 }
예제 #3
0
 /// <summary>
 /// Create a new SpriteClickEventArgs, specifying a position and sprite.
 /// </summary>
 /// <param name="x">The X position of the click.</param>
 /// <param name="y">The Y position of the click.</param>
 /// <param name="spr">The sprite that was clicked on.</param>
 /// <param name="manager">Whether or not this event is being called by a SpriteManager.</param>
 public SpriteClickEventArgs(Glib.XNA.SpriteLib.Sprite spr, int x, int y, bool manager)
 {
     this.Sprite = spr;
     this.X = x;
     this.CalledByManager = manager;
     this.Y = y;
 }