C# Класс UnityPlatformer.CharacterAction

Наследование: UnityEngine.MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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