SpriteLibrary
SpriteLibrary
SpriteLibrary
Sprite Class
Sprite Methods
PutBaseImageLocation Method
PutBaseImageLocation Method (Point)
PutBaseImageLocation Method (Double, Double)

# Sprite PutBaseImageLocation 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#
Copy

    public void PutBaseImageLocation(
    	Point NewLocationOnImage
    )

#### Parameters

NewLocationOnImage
  Type: System.Drawing
  Point
  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(List
Point
) function), as well as setting the speed (MovementSpeed).
C#
Copy

    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

#### Reference

Sprite Class
PutBaseImageLocation Overload
SpriteLibrary Namespace