Click or drag to resize

SpritePutBaseImageLocation Method (Point)

Put the Sprite at a specified location, using the dimentions of the BackgroundImage. Unless you are using coordinates you have gotten from a mouse-click, this is how you want to place a Sprite somewhere. It is the easiest way to track things. But, if you are doing something using mouse-click coordinates, you want to use PutPictureBoxLocation

Namespace:  SpriteLibrary
Assembly:  SpriteLibrary (in SpriteLibrary.dll) Version: 1.0.0.6 (1.0.0.6)
Syntax
C#
public void PutBaseImageLocation(
	Point NewLocationOnImage
)

Parameters

NewLocationOnImage
Type: System.DrawingPoint
The new point on the Image
Examples
Here is a short bit of code, showing how PutBaseImageLocation is part of the bigger picture. You may want to tell it to AutomaticallyMoves, set the direction SetSpriteDirectionDegrees(Double) (or use a MoveTo(ListPoint) function), as well as setting the speed (MovementSpeed).
C#
Sprite NewSprite = MySpriteController.DuplicateSprite("Dragon");
NewSprite.AutomaticallyMoves = true;
NewSprite.CannotMoveOutsideBox = true;
NewSprite.SpriteHitsPictureBox += SpriteBounces;
NewSprite.SetSpriteDirectionDegrees(90);
NewSprite.PutBaseImageLocation(new Point(startx, starty));
NewSprite.MovementSpeed = speed;
See Also