Small World Engine API Reference - v0.46.1
Preparing search index...
StateConfig
Interface StateConfig<TState, TContext, TEvent>
interface
StateConfig
<
TState
extends
string
,
TContext
,
TEvent
extends
string
=
string
,
>
{
autoTransition
?:
{
duration
:
number
;
nextState
:
TState
}
;
onEnter
?:
(
context
:
TContext
,
previousState
:
TState
|
null
)
=>
void
;
onExit
?:
(
context
:
TContext
,
nextState
:
TState
)
=>
void
;
onUpdate
?:
(
context
:
TContext
,
deltaTime
:
number
,
stateDuration
:
number
,
)
=>
void
;
transitions
?:
Partial
<
Record
<
TEvent
,
TState
>
>
;
}
Type Parameters
TState
extends
string
TContext
TEvent
extends
string
=
string
Index
Properties
auto
Transition?
on
Enter?
on
Exit?
on
Update?
transitions?
Properties
Optional
auto
Transition
autoTransition
?:
{
duration
:
number
;
nextState
:
TState
}
Optional
on
Enter
onEnter
?:
(
context
:
TContext
,
previousState
:
TState
|
null
)
=>
void
Optional
on
Exit
onExit
?:
(
context
:
TContext
,
nextState
:
TState
)
=>
void
Optional
on
Update
onUpdate
?:
(
context
:
TContext
,
deltaTime
:
number
,
stateDuration
:
number
)
=>
void
Optional
transitions
transitions
?:
Partial
<
Record
<
TEvent
,
TState
>
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
auto
Transition
on
Enter
on
Exit
on
Update
transitions
Small World Engine API Reference - v0.46.1
Loading...