C# 클래스 UnityPlatformer.CharacterAction

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

공개 프로퍼티들

프로퍼티 타입 설명
character Character
input PlatformerInput
onGrainControl System.Action
onLoseControl System.Action

공개 메소드들

메소드 설명
GainControl ( float delta ) : void

Called (once) when this action is going to be 'PerformAction' for first time Can be use to enter states

GetPostUpdateActions ( ) : PostUpdateActions

Return what to do next. By default should be: APPLY_GRAVITY | WORLD_COLLISIONS

LoseControl ( float delta ) : void

Called (once) when other action 'WantsToUpdate' or this action don't anymore Can be used to exit states and clean up

OnDisable ( ) : void

keep Character.actions in sync

OnEnable ( ) : void

keep Character.actions in sync

PerformAction ( float delta ) : void

Do your action here.

WantsToUpdate ( float delta ) : int

Tells the character we want to take control * Positive numbers fight: Higher number wins * Negative numbers are used to ignore fight and force Character to call PerformAction, but! because it doesn't win the fight onLoseControl, onGrainControl and GetPostUpdateActions are ignored.\n NOTE can be used as a replace for UpdateManager.PlatformerUpdate

메소드 상세

GainControl() 공개 메소드

Called (once) when this action is going to be 'PerformAction' for first time Can be use to enter states
public GainControl ( float delta ) : void
delta float
리턴 void

GetPostUpdateActions() 공개 추상적인 메소드

Return what to do next. By default should be: APPLY_GRAVITY | WORLD_COLLISIONS
public abstract GetPostUpdateActions ( ) : PostUpdateActions
리턴 PostUpdateActions

LoseControl() 공개 메소드

Called (once) when other action 'WantsToUpdate' or this action don't anymore Can be used to exit states and clean up
public LoseControl ( float delta ) : void
delta float
리턴 void

OnDisable() 공개 메소드

keep Character.actions in sync
public OnDisable ( ) : void
리턴 void

OnEnable() 공개 메소드

keep Character.actions in sync
public OnEnable ( ) : void
리턴 void

PerformAction() 공개 추상적인 메소드

Do your action here.
public abstract PerformAction ( float delta ) : void
delta float
리턴 void

WantsToUpdate() 공개 추상적인 메소드

Tells the character we want to take control * Positive numbers fight: Higher number wins * Negative numbers are used to ignore fight and force Character to call PerformAction, but! because it doesn't win the fight onLoseControl, onGrainControl and GetPostUpdateActions are ignored.\n NOTE can be used as a replace for UpdateManager.PlatformerUpdate
public abstract WantsToUpdate ( float delta ) : int
delta float
리턴 int

프로퍼티 상세

character 공개적으로 프로퍼티

Target character that will be affected by this movement
public Character character
리턴 Character

input 공개적으로 프로퍼티

Input to listen
public PlatformerInput input
리턴 PlatformerInput

onGrainControl 공개적으로 프로퍼티

Callback when this movement WantsToUpdate and has highest priority.
public Action,System onGrainControl
리턴 System.Action

onLoseControl 공개적으로 프로퍼티

Callback when this movement don't WantsToUpdate or another movement has higher priority
public Action,System onLoseControl
리턴 System.Action