2D Platform Controller  v1.7.0
Autogenerated code documentation for the 2D Platform Controller.
 All Classes Functions Variables Properties
DirectionChecker Class Reference

This script handles characters that don't have symmetrical colliders by flipping the colliders based on the direction the character it facing. It is important that you use the same method of checking direciton here that you use in your animator. More...

Inherits MonoBehaviour.

Public Member Functions

virtual bool UpdateDirection (RaycastCharacterController character)
 Call to recalculate the direction. More...
 

Public Attributes

int startingDirection = 1
 The starting direction, if your character starts facing left or right make sure this is set to 1 for right or -1 for left. More...
 

Protected Member Functions

virtual void SwitchColliders (RaycastCharacterController character)
 

Properties

virtual int CurrentDirection [get, set]
 The current direction being faced. 0 = NONE, 1 = RIGHT -1 = LEFT. More...
 

Detailed Description

This script handles characters that don't have symmetrical colliders by flipping the colliders based on the direction the character it facing. It is important that you use the same method of checking direciton here that you use in your animator.

You can extend this class to provide alternate functionality.

Member Function Documentation

virtual bool DirectionChecker.UpdateDirection ( RaycastCharacterController  character)
virtual

Call to recalculate the direction.

Returns
true, if colliders were switched, false otherwise.

Member Data Documentation

int DirectionChecker.startingDirection = 1

The starting direction, if your character starts facing left or right make sure this is set to 1 for right or -1 for left.

Property Documentation

virtual int DirectionChecker.CurrentDirection
getset

The current direction being faced. 0 = NONE, 1 = RIGHT -1 = LEFT.


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