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

Base class for all paltforms. More...

Inherits MonoBehaviour.

Inherited by BackAndForthPlatform, Brick, DecayingPlatform, FallingPlatform, KillBox, Ladder, PassthroughPlatform, RespawnPoint, Rope, SlidingPlatform, SlipperyPlatform, SpringboardPlatform, UnBreakableBrick, and UpAndDownPlatform.

Public Member Functions

virtual void DoAction (RaycastCollider collider, RaycastCharacterController character)
 This is called when a platform is hit. Override to implement platform behaviour. More...
 
virtual Transform ParentOnStand (RaycastCharacterController character)
 Does this platform want to have this platform become the characters parent. Used for moving platforms. More...
 
virtual CharacterState GetAnimationState (RaycastCharacterController character)
 Gets the animation for the character. Only called if you have set overrideAnimation to true. More...
 

Protected Member Functions

virtual void DoStart ()
 Override and add custom initialisation here. More...
 
virtual void Move ()
 Override with custom move code. More...
 
virtual void DoUpdate ()
 Override with custom update code here. More...
 

Properties

Vector3 velocity [get, set]
 
Transform myTransform [get, set]
 
virtual bool overrideX [get]
 If you override and return true for this, your platform will stop the character moving in the x direction. Instead you will need to the move the character from your platform code. See the ropes classes as an example. More...
 
virtual bool overrideY [get]
 If you override and return true for this, your platform will stop the character moving in the y direction. Instead you will need to the move the character from your platform code. See the ropes classes as an example. More...
 
virtual bool overrideAnimation [get]
 If you override and return true for this, your platform will stop the character moving in the x direction. instead you will need to the move character. See the ropes classes as an example. More...
 

Detailed Description

Base class for all paltforms.

Member Function Documentation

virtual void Platform.DoAction ( RaycastCollider  collider,
RaycastCharacterController  character 
)
virtual

This is called when a platform is hit. Override to implement platform behaviour.

Parameters
colliderThe collider that did the hitting.
characterThe character that did the hitting.

Reimplemented in RopeCollider, UnBreakableBrick, LadderCollider, DecayingPlatform, RespawnPoint, SlidingPlatform, SlipperyPlatform, KillBox, FallingPlatform, Brick, SpringboardPlatform, and PassthroughPlatform.

virtual void Platform.DoStart ( )
protectedvirtual

Override and add custom initialisation here.

Reimplemented in RopeCollider, BackAndForthPlatform, and UpAndDownPlatform.

virtual void Platform.DoUpdate ( )
protectedvirtual

Override with custom update code here.

Reimplemented in BackAndForthPlatform, UpAndDownPlatform, SlidingPlatform, and SlipperyPlatform.

virtual CharacterState Platform.GetAnimationState ( RaycastCharacterController  character)
virtual

Gets the animation for the character. Only called if you have set overrideAnimation to true.

Returns
The animation state.

Reimplemented in RopeCollider.

virtual void Platform.Move ( )
protectedvirtual

Override with custom move code.

Reimplemented in RopeCollider, and LadderCollider.

virtual Transform Platform.ParentOnStand ( RaycastCharacterController  character)
virtual

Does this platform want to have this platform become the characters parent. Used for moving platforms.

Returns
Return a transform if you want to reparent the character.

Reimplemented in BackAndForthPlatform, UpAndDownPlatform, RopeCollider, FallingPlatform, LadderCollider, and TopStepPlatform.

Property Documentation

virtual bool Platform.overrideAnimation
get

If you override and return true for this, your platform will stop the character moving in the x direction. instead you will need to the move character. See the ropes classes as an example.

virtual bool Platform.overrideX
get

If you override and return true for this, your platform will stop the character moving in the x direction. Instead you will need to the move the character from your platform code. See the ropes classes as an example.

virtual bool Platform.overrideY
get

If you override and return true for this, your platform will stop the character moving in the y direction. Instead you will need to the move the character from your platform code. See the ropes classes as an example.


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