2D Platform Controller  v1.7.0
Autogenerated code documentation for the 2D Platform Controller.
 All Classes Functions Variables Properties
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
oCAnimationLoggerLogs the animation state to the console.
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.
oCCameraFollow
oCCharacterControllerEventDelegateCharacter controller animation event delegate.
oCClimbDetailsClimb details.
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 :)
oCCrouchDetailsCrouch details. Control what happens when you press down.
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.
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
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
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.
oCEnemyPatrol
oCFallDamageAdd this to a character to enable the character to take fall damage.
oCFallingPlatformPlatform that falls after you touch it. The fall is delayed by the value of fallDelay.
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
oCIEnemyInterface used to determine that an object is an enemy.
oCJumpDetailsJump details. Note that jumps are also affected by the Physics.gravity setting.
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.
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.
oCLadderColliderLadder collider. Attach this to every collider used in a ladder. This is like a rung of the ladder.
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.
oCLadderWizardEditorWindow
oCLedgeDetailsLedge details. Control what happens when you hang off a ledge.
oCModelAnimator
oCMovementDetailsMovement details.
oCPassthroughPlatform
oCPlatformBase class for all paltforms.
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.
oCRaycastCharacterControllerEditor
oCRaycastCharacterInputAbstract class for character input, extend this to provide your own input.
oCRaycastColliderRaycast collider. The main collision object.
oCRespawnPointRespawn point, platform implementation.
oCRopeBase class for rope colliders. Extend this to create your own rope functions.
oCRopeColliderRope platform. Attach this to every collider used in a rope. Note that rope colliders must be the child of a rigidbody.
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.
oCSimpleCharacterInputA simple character input. Arrows to move, left SHIFT to run, SPACE to jump.
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.
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).
oCSlopeDetailsSlope details.
oCSpringboardPlatformVery simple bouncy springboard platform. Boucnes a character with a fix force each time they stand on it.
oCStandardMobileInputA simple mobile input controller which uses the Unity Standard Assets (Mobile) Joystick.
oCTopStepPlatformTop step platform, this script should be attached to the top step of a ladder.
oCTouchControllerA touch input for the 2D Platform controller
oCTouchControllerButton
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
oCUpAndDownPlatformA platform that moves up and down. Note that it returns true for parent on stand.
\CWallDetailsWall details. Controls wall jump and wall slide.