Corgi Engine  v8.8
MoreMountains.CorgiEngine.Ladder Class Reference

Adds this class to your ladders so a Character can climb them. More...

Inheritance diagram for MoreMountains.CorgiEngine.Ladder:
MoreMountains.CorgiEngine.CorgiMonoBehaviour

Public Types

enum  LadderTypes { LadderTypes.Simple, LadderTypes.BiDirectional }
 the different types of ladders More...
 

Public Attributes

LadderTypes LadderType = LadderTypes.Simple
 determines whether this ladder is simple (vertical) or bidirectional More...
 
bool CenterCharacterOnLadder = true
 should the character be centered horizontally on the ladder when climbing More...
 
GameObject LadderPlatform
 the platform at the top of the ladder - this can be a ground platform More...
 
bool 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 More...
 

Protected Member Functions

virtual void Start ()
 On Start we initialize our ladder More...
 
virtual void Initialization ()
 Grabs and stores the collider, and makes sure there's one. Repositions the platform if needed More...
 
virtual void RepositionLadderPlatform ()
 Repositions the ladder platform so it matches perfectly the top of the ladder More...
 
virtual void OnTriggerEnter2D (Collider2D collider)
 Triggered when something collides with the ladder More...
 
virtual void OnTriggerExit2D (Collider2D collider)
 Triggered when something exits the ladder More...
 

Protected Attributes

Collider2D _collider2D
 
Vector3 _newLadderPlatformPosition
 

Properties

BoxCollider2D LadderPlatformBoxCollider2D [get, protected set]
 
EdgeCollider2D LadderPlatformEdgeCollider2D [get, protected set]
 

Detailed Description

Adds this class to your ladders so a Character can climb them.

Member Enumeration Documentation

◆ LadderTypes

the different types of ladders

Enumerator
Simple 
BiDirectional 

Member Function Documentation

◆ 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
colliderSomething colliding with the ladder.

◆ OnTriggerExit2D()

virtual void MoreMountains.CorgiEngine.Ladder.OnTriggerExit2D ( Collider2D  collider)
protectedvirtual

Triggered when something exits the ladder

Parameters
colliderSomething 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

Member Data Documentation

◆ _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

LadderTypes MoreMountains.CorgiEngine.Ladder.LadderType = LadderTypes.Simple

determines whether this ladder is simple (vertical) or bidirectional

Property Documentation

◆ 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: