Click or drag to resize
SpriteBaseSetInputsTowardCategory Method
Set the state of the directional inputs on this sprite to move toward the specified sprite in a category.

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version:
public virtual void SetInputsTowardCategory(
	SpriteCollection Target,
	int Index


Type: (Default Namespace)SpriteCollection
Specifies the sprite collection containing the sprite toward which this sprite will try to move.
Type: SystemInt32
Use GetNearestSpriteIndex(SpriteCollection) to compute this value or pass -1 to compute the current nearest sprite each time this is called.
This function assumes that the directional inputs on the sprite cause the sprite to move directly in the direction associated with the input. It will not work if, for example, left arrow causes the sprite to turn left instead of move left.
See Also