Documentation
¶
Overview ¶
Package action describes the valid actions that any character may take
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action int
const ( InvalidAction Action = iota ActionSkill ActionBurst ActionAttack ActionCharge ActionHighPlunge ActionLowPlunge ActionAim ActionDash ActionJump // following action have to implementations ActionSwap ActionWalk ActionWait // character should stand around and wait ActionDelay // delay before executing next action EndActionType // these are only used for frames purposes and that's why it's after end ActionSkillHoldFramesOnly )
func StringToAction ¶
func (Action) MarshalJSON ¶ added in v1.2.2
func (*Action) UnmarshalJSON ¶ added in v1.2.2
type AnimationState ¶
type AnimationState int
const ( Idle AnimationState = iota NormalAttackState ChargeAttackState PlungeAttackState SkillState BurstState AimState DashState JumpState WalkState SwapState )
func (AnimationState) String ¶
func (a AnimationState) String() string
type Evaluator ¶
type Evaluator interface { NextAction() (*Eval, error) // NextAction should reuturn the next action, or nil if no actions left Continue() Exit() error Err() error Start() }
Evaluator provides method for getting next action
type Info ¶
type Info struct { Frames func(next Action) int `json:"-"` AnimationLength int CanQueueAfter int State AnimationState FramePausedOnHitlag func() bool `json:"-"` OnRemoved func(next AnimationState) `json:"-"` // following are exposed only so we can log it properly TimePassed float64 NormalizedTimePassed float64 UseNormalizedTime func(next Action) bool // contains filtered or unexported fields }
TODO: add a sync.Pool here to save some memory allocs
func (*Info) AnimationState ¶
func (a *Info) AnimationState() AnimationState
func (*Info) CanQueueNext ¶
func (*Info) QueueAction ¶
Click to show internal directories.
Click to hide internal directories.