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
파일 보기 프로젝트 열기: llafuente/unity-platformer

공개 프로퍼티들

프로퍼티 타입 설명
onInterrupt System.Action

보호된 프로퍼티들

프로퍼티 타입 설명
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