2D Platform Controller  v1.7.0
Autogenerated code documentation for the 2D Platform Controller.
 All Classes Functions Variables Properties
Class Hierarchy
This inheritance list is sorted roughly, but not completely, alphabetically:
[detail level 12345]
oCCharacterControllerEventDelegateCharacter controller animation event delegate.
oCClimbDetailsClimb details.
oCCrouchDetailsCrouch details. Control what happens when you press down.
oCEditor
|\CRaycastCharacterControllerEditor
oCEditorWindow
|\CLadderWizardEditorWindow
oCIEnemyInterface used to determine that an object is an enemy.
|oCEnemyAIControllerAn enemy AI which tries to follow the player. Its built using the hack until it works philosophy of AI design, so the code might be a little hard to follow. Currently it doesn't cater for sense distance nor do path finding. Specifically it doesn't plan a route to a player it just tries to get on to higher platforms if the player is higher and lower platforms if the player is lower
|oCEnemyBounceAndFallThis enemy uses only the MoveInX and MoveInY methods of the character controller. It behaves much like Super Mario enemies in that it walks in a given direction unless it runs in to something in which case it turns around
|\CEnemyPatrol
oCJumpDetailsJump details. Note that jumps are also affected by the Physics.gravity setting.
oCLedgeDetailsLedge details. Control what happens when you hang off a ledge.
oCMonoBehaviour
|oCAnimationLoggerLogs the animation state to the console.
|oCCameraFollow
|oCCollectableA simple collectable item, it plays a particle effect when collected and invokes the Collect method on the HitBox class. Requries a HitBox on the character :)
|oCDirectionCheckerThis 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
|oCEnemyPatrol
|oCFallDamageAdd this to a character to enable the character to take fall damage.
|oCFloatMake the character float gently downwards instead of falling if they hold jump. COuld be changed to use any key (i.e. Input.GetKeyDown() or to not reuqire a key at all (for example as a special ability that is turned on or off by the presence or absence of an item).
|oCHeroAnimator
|oCHitBoxA hit box takes damage and passes it to a health component for processing. This allows you to easily move the damage points or alternatively attach them to transforms
|oCJumpOnHeadAttach a trigger for the head of the enemy and then add this script to it to kill the enemy when you jump on him.
|oCLadderControlThe main control class for a ladder. Put this at the root of your ladder. Can also be used for vine like climbable or extended for other climbable behaviour.
|oCModelAnimator
|oCPlatformBase class for all paltforms.
||oCBackAndForthPlatformA platform that moves left and right. Note that it returns true for parent on stand.
||oCBrickA simple mario like brick, showing how you can respond to hitting something with characters head.
||oCDecayingPlatformPlatform that will fall if you stand on it for more than the decay time. The timer resets each time to you leave the paltform so if you keep jumping you can stay on the platform.
||oCFallingPlatformPlatform that falls after you touch it. The fall is delayed by the value of fallDelay.
||oCKillBoxRespawn the player when they touch this. Its a pretty simple implementation. In a real game you probably wont to invoke a death method which does all the things required for death (lives, scores, effects, sounds, etc)
||oCLadderBase class for ladder colliders. Extend this to create your own ladder functions.
|||\CLadderColliderLadder collider. Attach this to every collider used in a ladder. This is like a rung of the ladder.
||| \CTopStepPlatformTop step platform, this script should be attached to the top step of a ladder.
||oCPassthroughPlatform
||oCRespawnPointRespawn point, platform implementation.
||oCRopeBase class for rope colliders. Extend this to create your own rope functions.
|||\CRopeColliderRope platform. Attach this to every collider used in a rope. Note that rope colliders must be the child of a rigidbody.
||oCSlidingPlatformA platform that adds horizontal velocity to the character. For example a convery belt.
||oCSlipperyPlatformA platform which reduces drag, making the character slide around (i.e ice). Could also be used to increase drag (sticky mud or long grass).
||oCSpringboardPlatformVery simple bouncy springboard platform. Boucnes a character with a fix force each time they stand on it.
||oCUnBreakableBrickA simple mario like brick, showing how you can respond to hitting something with characters head. This brick wont break but will instead "bobble" when you hit it. It can optionally spawn an object like a coin
||\CUpAndDownPlatformA platform that moves up and down. Note that it returns true for parent on stand.
|oCProjectileA very simple projectile that moves across the screen and triggers the damage method on a HitBox if it collides with one.
|oCRaycastCharacterControllerRaycast character controller a controller for 2D platform games.
||\CEnemyBounceAndFallThis enemy uses only the MoveInX and MoveInY methods of the character controller. It behaves much like Super Mario enemies in that it walks in a given direction unless it runs in to something in which case it turns around
|oCRaycastCharacterInputAbstract class for character input, extend this to provide your own input.
||oCEnemyAIControllerAn enemy AI which tries to follow the player. Its built using the hack until it works philosophy of AI design, so the code might be a little hard to follow. Currently it doesn't cater for sense distance nor do path finding. Specifically it doesn't plan a route to a player it just tries to get on to higher platforms if the player is higher and lower platforms if the player is lower
||oCEnemyBounceAndFallInputThis is the 'AI' for the bounce and fall controller. Basically it bounces off things. It also has a sense distance and the enemy wont activate until within this distance.
||oCSimpleCharacterInputA simple character input. Arrows to move, left SHIFT to run, SPACE to jump.
||oCStandardMobileInputA simple mobile input controller which uses the Unity Standard Assets (Mobile) Joystick.
||\CTouchControllerA touch input for the 2D Platform controller
|oCRopeControl
|oCSetUpPhysicsSet gravity to a higher value as it looks and feel better. Make sure the ingore raycasts layer doesn't collide with any of the character layers the defaul layer or itself
|oCShooterExtremely simple "gun". Purely here to demonstrate the hit box/damge features.
|oCSimpleHealthThis is a simple script for tracking characters health. It provides a Damage method and a
|oCSimpleHealthBarUIA very simple health bar UI. You could extend to create your own health bar if you wnt to easily integrate with the other sample scripts.
|\CTouchControllerButton
oCMovementDetailsMovement details.
oCRaycastColliderRaycast collider. The main collision object.
oCSlopeDetailsSlope details.
\CWallDetailsWall details. Controls wall jump and wall slide.