Click or drag to resize
SpriteBasePushTowardCategory Method
Push this sprite toward a sprite in the specified category.

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
public virtual bool PushTowardCategory(
	SpriteCollection Target,
	int Index,
	int Force
)

Parameters

Target
Type: (Default Namespace)SpriteCollection
Specifies a category containint the target sprite toward which this sprite will be pushed.
Index
Type: SystemInt32
Specifies the 0-based index of a sprite in the specified category. Use GetNearestSpriteIndex(SpriteCollection) to compute the index of the nearest sprite, which can then be passed to this parameter. Pass -1 in this parameter to push the sprite toward the current nearest sprite rather than a pre-computed index.
Force
Type: SystemInt32
Force in tenths of a pixel per frame per frame that will be applied.

Return Value

Type: Boolean
True if the sprite was pushed, or false if there are no active sprites in the target category or the sprite is already overlapping the target.
Remarks
If there is no active sprite in the target category, or if the sprite is overlapping the target exactly, this function will have no effect.
See Also