Click or drag to resize
PlanBaseFollowPath Method
Cause the specified sprite to follow the coordinates in this plan as a path.

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
public virtual void FollowPath(
	SpriteBase Sprite,
	ref int CoordinateIndex,
	ref int WaitCounter
)

Parameters

Sprite
Type: (Default Namespace)SpriteBase
Sprite that will follow this plan's path.
CoordinateIndex
Type: SystemInt32
0-based index of the coordinate in this plan toward which the sprite is currently heading. This is usually a parameter of the sprite.
WaitCounter
Type: SystemInt32
Counter that tracks how long a sprite has waited at a particular coordinage. This is usualyl a parameter of the sprite.
Remarks
This function combines a number of other path-following rule functions into a single simple function that you can use to make a sprite follow a path with just a single rule. The following rule functions are combined within this function: IsSpriteActive(SpriteBase), PushSpriteTowardCoordinate(SpriteBase, Int32, Int32), StopSprite(SpriteBase)CheckNextCoordinate(SpriteBase, Int32, Int32),
Caution note Caution
When using this function to follow a path, the sprite definition itself is responsible for limiting the speed (see LimitVelocity(Int32)) and performing the actual movement (see MoveByVelocity).
See Also