Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.ModelRotationDirectionFacer Class Reference

Changes facing direction by rotating the model. More...

Inheritance diagram for PlatformerPro.ModelRotationDirectionFacer:

Public Attributes

float rotationOffset
 An extra rotation applied to all rotations (use this to easily account for backed in model rotations). More...
 
bool dontRotateInZ
 If true offset the parent animation so the sprite doesn't rotate in the z direction More...
 
AnimationState[] faceBackAnimations
 List of animation states in which the character should face backwards (0 degrees). More...
 
AnimationState[] faceForwardAnimations
 List of animation states in which the character should face forwards (180 degrees). More...
 
AnimationState[] faceRightAnimations
 List of animation states in which the character should face right (90 degrees). More...
 
AnimationState[] faceLeftAnimations
 List of animation states in which the character should face left (-90 degrees). More...
 
float rotationSpeed
 How fast the character rotates. More...
 

Protected Member Functions

void SetTargetRotation ()
 Sets the target rotation based on character state and direction. More...
 
void RotateToTarget ()
 Does the rotation. More...
 

Protected Attributes

IMob character
 The character reference. More...
 
Quaternion targetRotation
 Desired rotation. More...
 

Detailed Description

Changes facing direction by rotating the model.

Member Function Documentation

◆ RotateToTarget()

void PlatformerPro.ModelRotationDirectionFacer.RotateToTarget ( )
protected

Does the rotation.

◆ SetTargetRotation()

void PlatformerPro.ModelRotationDirectionFacer.SetTargetRotation ( )
protected

Sets the target rotation based on character state and direction.

Member Data Documentation

◆ character

IMob PlatformerPro.ModelRotationDirectionFacer.character
protected

The character reference.

◆ dontRotateInZ

bool PlatformerPro.ModelRotationDirectionFacer.dontRotateInZ

If true offset the parent animation so the sprite doesn't rotate in the z direction

◆ faceBackAnimations

AnimationState [] PlatformerPro.ModelRotationDirectionFacer.faceBackAnimations

List of animation states in which the character should face backwards (0 degrees).

◆ faceForwardAnimations

AnimationState [] PlatformerPro.ModelRotationDirectionFacer.faceForwardAnimations

List of animation states in which the character should face forwards (180 degrees).

◆ faceLeftAnimations

AnimationState [] PlatformerPro.ModelRotationDirectionFacer.faceLeftAnimations

List of animation states in which the character should face left (-90 degrees).

◆ faceRightAnimations

AnimationState [] PlatformerPro.ModelRotationDirectionFacer.faceRightAnimations

List of animation states in which the character should face right (90 degrees).

◆ rotationOffset

float PlatformerPro.ModelRotationDirectionFacer.rotationOffset

An extra rotation applied to all rotations (use this to easily account for backed in model rotations).

◆ rotationSpeed

float PlatformerPro.ModelRotationDirectionFacer.rotationSpeed

How fast the character rotates.

◆ targetRotation

Quaternion PlatformerPro.ModelRotationDirectionFacer.targetRotation
protected

Desired rotation.


The documentation for this class was generated from the following file: