Click or drag to resize
PlanBasePushSpriteTowardPoint Method
Alter the velocity of the specified sprite to go toward a specified location.

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
public virtual void PushSpriteTowardPoint(
	SpriteBase Sprite,
	Point Target,
	int Force
)

Parameters

Sprite
Type: (Default Namespace)SpriteBase
The sprite whose velocity will be affected
Target
Type: System.DrawingPoint
Specifies a point toward which the sprite will be pushed
Force
Type: SystemInt32
How hard to push the sprite in tenths of a pixel per frame per frame
Remarks
This function is a more generalized form of PushSpriteTowardCoordinate(SpriteBase, Int32, Int32). Rather than pushing a sprite toward a coordinate in the current plan, it can push it toward any location that can be represented as a point.
Examples
This example pushes the sprite toward the mouse location.
PushSpriteTowardPoint(m_ParentLayer.m_Plasma_1, ParentLayer.GetMousePosition(), 40);
See Also