C# 클래스 UnityPlatformer.Ladder

상속: UnityEngine.MonoBehaviour
파일 보기 프로젝트 열기: llafuente/unity-platformer 1 사용 예제들

공개 메소드들

메소드 설명
DisableLadder ( Character p ) : void

Notify Character to exit ladder area

Dismount ( Character p ) : void

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

EnableLadder ( Character p ) : void

Notify Character is on ladder area

GetBottom ( ) : Vector3

get real-world-coordinates bottom of the ladder

GetTop ( ) : Vector3

get real-world-coordinates top of the ladder

IsAboveTop ( Character c, Vector2 pos ) : bool

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 ( Character c, Vector2 pos ) : bool

Return if the Character is very close to the bottom

IsAtTop ( Character c, Vector2 pos ) : bool

Return if the Character is very close to the top

IsBelowBottom ( Character c, Vector2 pos ) : bool

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 ( Collider2D o ) : void

if a hitbox (EnterAreas) enters -> EnableLadder

OnTriggerExit2D ( Collider2D o ) : void

if a hitbox (EnterAreas) lave -> DisableLadder

Start ( ) : void

get BoxCollider2D

비공개 메소드들

메소드 설명
OnDrawGizmos ( ) : void

메소드 상세

DisableLadder() 공개 메소드

Notify Character to exit ladder area
public DisableLadder ( Character p ) : void
p Character
리턴 void

Dismount() 공개 메소드

Notify Character to exit ladder state For example if character jumps.
public Dismount ( Character p ) : void
p Character
리턴 void

EnableLadder() 공개 메소드

Notify Character is on ladder area
public EnableLadder ( Character p ) : void
p Character
리턴 void

GetBottom() 공개 메소드

get real-world-coordinates bottom of the ladder
public GetBottom ( ) : Vector3
리턴 UnityEngine.Vector3

GetTop() 공개 메소드

get real-world-coordinates top of the ladder
public GetTop ( ) : Vector3
리턴 UnityEngine.Vector3

IsAboveTop() 공개 메소드

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
public IsAboveTop ( Character c, Vector2 pos ) : bool
c Character
pos UnityEngine.Vector2
리턴 bool

IsAtBottom() 공개 메소드

Return if the Character is very close to the bottom
public IsAtBottom ( Character c, Vector2 pos ) : bool
c Character
pos UnityEngine.Vector2
리턴 bool

IsAtTop() 공개 메소드

Return if the Character is very close to the top
public IsAtTop ( Character c, Vector2 pos ) : bool
c Character
pos UnityEngine.Vector2
리턴 bool

IsBelowBottom() 공개 메소드

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
public IsBelowBottom ( Character c, Vector2 pos ) : bool
c Character
pos UnityEngine.Vector2
리턴 bool

OnTriggerEnter2D() 공개 메소드

if a hitbox (EnterAreas) enters -> EnableLadder
public OnTriggerEnter2D ( Collider2D o ) : void
o UnityEngine.Collider2D
리턴 void

OnTriggerExit2D() 공개 메소드

if a hitbox (EnterAreas) lave -> DisableLadder
public OnTriggerExit2D ( Collider2D o ) : void
o UnityEngine.Collider2D
리턴 void

Start() 공개 메소드

get BoxCollider2D
public Start ( ) : void
리턴 void