platformer
Public Member Functions | Public Attributes | List of all members
UnityPlatformer.Ladder Class Reference

Ladder tile. Climb ladder More...

Inheritance diagram for UnityPlatformer.Ladder:
UnityPlatformer.Physhic2DMonoBehaviour

Public Member Functions

override void Start ()
 get BoxCollider2D More...
 
virtual Vector3 GetTop ()
 get real-world-coordinates top of the ladder More...
 
virtual Vector3 GetBottom ()
 get real-world-coordinates bottom of the ladder More...
 
virtual bool IsAboveTop (Character c, Vector2 pos)
 Return if the character at given position will be above the top this is used to know before moving the character is will reach the top in the next frame More...
 
virtual bool IsAtTop (Character c, Vector2 pos)
 Return if the Character is very close to the top More...
 
virtual bool IsBelowBottom (Character c, Vector2 pos)
 Return if the character at given position will be above the botom this is used to know before moving the character is will reach the botom in the next frame More...
 
virtual bool IsAtBottom (Character c, Vector2 pos)
 Return if the Character is very close to the bottom More...
 
virtual void EnableLadder (Character p)
 Notify Character is on ladder area More...
 
virtual void Dismount (Character p)
 Notify Character to exit ladder state For example if character jumps. More...
 
virtual void DisableLadder (Character p)
 Notify Character to exit ladder area More...
 
virtual void OnTriggerEnter2D (Collider2D o)
 if a hitbox (EnterAreas) enters -> EnableLadder More...
 
virtual void OnTriggerExit2D (Collider2D o)
 if a hitbox (EnterAreas) lave -> DisableLadder More...
 

Public Attributes

bool topDismount = true
 true: Top is reachable (Ladder) false: Top is not reachable (Vine) More...
 
bool bottomDismount = true
 true: Bottom is reachable (Ladder, Fall) false: Bottom is not reachable (Vine) More...
 
- Public Attributes inherited from UnityPlatformer.Physhic2DMonoBehaviour
bool debug = false
 Display collider as flat color More...
 

Detailed Description

Ladder tile. Climb ladder

Member Function Documentation

◆ DisableLadder()

virtual void UnityPlatformer.Ladder.DisableLadder ( Character  p)
inlinevirtual

Notify Character to exit ladder area

◆ Dismount()

virtual void UnityPlatformer.Ladder.Dismount ( Character  p)
inlinevirtual

Notify Character to exit ladder state For example if character jumps.

◆ EnableLadder()

virtual void UnityPlatformer.Ladder.EnableLadder ( Character  p)
inlinevirtual

Notify Character is on ladder area

◆ GetBottom()

virtual Vector3 UnityPlatformer.Ladder.GetBottom ( )
inlinevirtual

get real-world-coordinates bottom of the ladder

◆ GetTop()

virtual Vector3 UnityPlatformer.Ladder.GetTop ( )
inlinevirtual

get real-world-coordinates top of the ladder

◆ IsAboveTop()

virtual bool UnityPlatformer.Ladder.IsAboveTop ( Character  c,
Vector2  pos 
)
inlinevirtual

Return if the character at given position will be above the top this is used to know before moving the character is will reach the top in the next frame

◆ IsAtBottom()

virtual bool UnityPlatformer.Ladder.IsAtBottom ( Character  c,
Vector2  pos 
)
inlinevirtual

Return if the Character is very close to the bottom

◆ IsAtTop()

virtual bool UnityPlatformer.Ladder.IsAtTop ( Character  c,
Vector2  pos 
)
inlinevirtual

Return if the Character is very close to the top

◆ IsBelowBottom()

virtual bool UnityPlatformer.Ladder.IsBelowBottom ( Character  c,
Vector2  pos 
)
inlinevirtual

Return if the character at given position will be above the botom this is used to know before moving the character is will reach the botom in the next frame

◆ OnTriggerEnter2D()

virtual void UnityPlatformer.Ladder.OnTriggerEnter2D ( Collider2D  o)
inlinevirtual

if a hitbox (EnterAreas) enters -> EnableLadder

◆ OnTriggerExit2D()

virtual void UnityPlatformer.Ladder.OnTriggerExit2D ( Collider2D  o)
inlinevirtual

if a hitbox (EnterAreas) lave -> DisableLadder

◆ Start()

override void UnityPlatformer.Ladder.Start ( )
inlinevirtual

get BoxCollider2D

Reimplemented from UnityPlatformer.Physhic2DMonoBehaviour.

Member Data Documentation

◆ bottomDismount

bool UnityPlatformer.Ladder.bottomDismount = true

true: Bottom is reachable (Ladder, Fall) false: Bottom is not reachable (Vine)

◆ topDismount

bool UnityPlatformer.Ladder.topDismount = true

true: Top is reachable (Ladder) false: Top is not reachable (Vine)


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