Click or drag to resize
SpriteBaseAddSpriteHere Method
Create a new (dynamic) instance of the specified sprite positioned such that HotSpot on the created sprite overlaps Location on this sprite.

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
public virtual void AddSpriteHere(
	Type SpriteDefinition,
	RelativePosition Location,
	RelativePosition HotSpot
)

Parameters

SpriteDefinition
Type: SystemType
Specifies the type of sprite to create
Location
Type: (Default Namespace)RelativePosition
Specifies a point in the current sprite, relative to which the new sprite will be created.
HotSpot
Type: (Default Namespace)RelativePosition
Specifies a point within the created sprite that will be used to position the sprite (the location of the "handle" by which it is positioned).
Remarks
See TileAddSprite(Int32, Type) for more information about dynamically added sprites.
Examples
The following code will create an instance of a sprite named "Bullet" such that the left side of the bullet matches up with the right side of the current sprite. (The bullet will be immediately to the right of this sprite, overlapping by 1 pixel.)
AddSpriteHere(typeof(Sprites.Bullet), RelativePosition.RightMiddle, RelativePosition.LeftMiddle);
See Also