Click or drag to resize
SpriteBaseRotateVelocity Method
Redirect this sprite's velocity to be 100% in the direction that it is facing.

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

Parameters

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
FirstState must represent the sprite in a rightward-aiming state, and each subsequent state must represent an equal counter-clockwise rotation until StateCount states result in the sprite pointing almost rightward again. The sprite's current state must be one of the states in that range. This function is useful for car-type sprites where turning the sprite should automatically cause the sprite to be moving in that direction only (no drifting in the previous direction like a space ship would).
See Also