Click or drag to resize
SpriteBasePolarAccelerate Method
Accelerate a rotating sprite in the direction that it is aiming.

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
public virtual void PolarAccelerate(
	int Acceleration,
	int FirstState,
	int StateCount
)

Parameters

Acceleration
Type: SystemInt32
Specifies acceleration amount in tenths of a pixel per frame per frame.
FirstState
Type: SystemInt32
Provide the first state of this sprite's group of states (representing the sprite pointing rightward).
StateCount
Type: SystemInt32
Provide the number of states this sprite takes to represent one full rotation.
Remarks
The current angle of this sprite is calculated by assuming that the provided first state points rightward, and that each subsequent state rotates the sprite counter-clockwise in equal increments until StateCount states have resulted in one full rotation. The sprite's current state is somewhere in that progression, and determines the current angle. The actual formula is (state - FirstState) * pi * 2 / StateCount, which calculates the angle in radians.
See Also