Adds this class to your ladders so a Character can climb them.
More...
Adds this class to your ladders so a Character can climb them.
◆ LadderTypes
the different types of ladders
Enumerator |
---|
Simple | |
BiDirectional | |
◆ Initialization()
virtual void MoreMountains.CorgiEngine.Ladder.Initialization |
( |
| ) |
|
|
protectedvirtual |
Grabs and stores the collider, and makes sure there's one. Repositions the platform if needed
◆ OnTriggerEnter2D()
virtual void MoreMountains.CorgiEngine.Ladder.OnTriggerEnter2D |
( |
Collider2D |
collider | ) |
|
|
protectedvirtual |
Triggered when something collides with the ladder
- Parameters
-
collider | Something colliding with the ladder. |
◆ OnTriggerExit2D()
virtual void MoreMountains.CorgiEngine.Ladder.OnTriggerExit2D |
( |
Collider2D |
collider | ) |
|
|
protectedvirtual |
Triggered when something exits the ladder
- Parameters
-
collider | Something colliding with the ladder. |
◆ RepositionLadderPlatform()
virtual void MoreMountains.CorgiEngine.Ladder.RepositionLadderPlatform |
( |
| ) |
|
|
protectedvirtual |
Repositions the ladder platform so it matches perfectly the top of the ladder
◆ Start()
virtual void MoreMountains.CorgiEngine.Ladder.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we initialize our ladder
◆ _collider2D
Collider2D MoreMountains.CorgiEngine.Ladder._collider2D |
|
protected |
◆ _newLadderPlatformPosition
Vector3 MoreMountains.CorgiEngine.Ladder._newLadderPlatformPosition |
|
protected |
◆ AutoPositionLadderPlatform
bool MoreMountains.CorgiEngine.Ladder.AutoPositionLadderPlatform = false |
if this is set to true, on Initialization, the LadderPlatform will be automatically repositioned to match the top of the ladder's collider
◆ CenterCharacterOnLadder
bool MoreMountains.CorgiEngine.Ladder.CenterCharacterOnLadder = true |
should the character be centered horizontally on the ladder when climbing
◆ LadderPlatform
GameObject MoreMountains.CorgiEngine.Ladder.LadderPlatform |
the platform at the top of the ladder - this can be a ground platform
◆ LadderType
determines whether this ladder is simple (vertical) or bidirectional
◆ LadderPlatformBoxCollider2D
BoxCollider2D MoreMountains.CorgiEngine.Ladder.LadderPlatformBoxCollider2D |
|
getprotected set |
◆ LadderPlatformEdgeCollider2D
EdgeCollider2D MoreMountains.CorgiEngine.Ladder.LadderPlatformEdgeCollider2D |
|
getprotected set |
The documentation for this class was generated from the following file:
- Assets/CorgiEngine/Common/Scripts/Environment/Ladder.cs