C# Класс UnityPlatformer.CharacterActionTimed

Manage actions that has the loop: cast -> duration -> cooldown . Timeline explanation:\n Character hit the cast action: time = 0 (Play animation if we start casting) action has a castTime. During 0 to castTime we don't deal damage\n action has a durationTime. During castTime to castTime + durationTime we deal damage\n We have to wail from 0 to cooldownTime to cast again
Наследование: CharacterAction
Показать файл Открыть проект

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

Свойство Тип Описание
onInterrupt System.Action

Защищенные свойства (Protected)

Свойство Тип Описание
actionCounter int
castFrames int
cooldownCounter int
cooldownFrames int
durationFrames int

Открытые методы

Метод Описание
EndAction ( ) : void

End action!

Interrupt ( bool resetCooldown ) : void

interrupt current action

IsActionComplete ( ) : bool

attack ended

IsActionInProgress ( ) : bool

Attacking time

IsCasting ( ) : bool

Casting time

IsCooldown ( ) : bool

Can perform action?

OnEnable ( ) : void

conver time to frames

StartAction ( ) : void

Start action!

WantsToUpdate ( float delta ) : int

Описание методов

EndAction() публичный Метод

End action!
public EndAction ( ) : void
Результат void

Interrupt() публичный Метод

interrupt current action
public Interrupt ( bool resetCooldown ) : void
resetCooldown bool Reset cooldown. Allow to cast again!
Результат void

IsActionComplete() публичный Метод

attack ended
public IsActionComplete ( ) : bool
Результат bool

IsActionInProgress() публичный Метод

Attacking time
public IsActionInProgress ( ) : bool
Результат bool

IsCasting() публичный Метод

Casting time
public IsCasting ( ) : bool
Результат bool

IsCooldown() публичный Метод

Can perform action?
public IsCooldown ( ) : bool
Результат bool

OnEnable() публичный Метод

conver time to frames
public OnEnable ( ) : void
Результат void

StartAction() публичный Метод

Start action!
public StartAction ( ) : void
Результат void

WantsToUpdate() публичный Метод

public WantsToUpdate ( float delta ) : int
delta float
Результат int

Описание свойств

actionCounter защищенное свойство

count frames the action is running
protected int actionCounter
Результат int

castFrames защищенное свойство

castTime in frames
protected int castFrames
Результат int

cooldownCounter защищенное свойство

counter for cooldown
protected int cooldownCounter
Результат int

cooldownFrames защищенное свойство

cooldownTime in frames
protected int cooldownFrames
Результат int

durationFrames защищенное свойство

durationTime in frames
protected int durationFrames
Результат int

onInterrupt публичное свойство

Notify action is interrupted NOTE It's not used in the library right now, but you can
public Action,System onInterrupt
Результат System.Action