元编程参考文档

状态机

7 个节点

本页内容 7

状态机

函数

此节点没有文档说明。

签名
状态机() -> State Machine
StateMachineApplication StateMachineApplication()

返回

状态机State Machine
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
状态机
所属包
状态机

添加转换

函数

Declares one transition. A null Condition is an UNCONDITIONAL transition: it is
satisfied on every evaluation, so the machine leaves From State after its next
Update returns (subject to priority - an unconditional low-priority transition is a fallback edge).
That is the recorded phase-3 decision for a transition whose payload names no condition graph: an
edge the author drew means something, and "always" is the natural meaning of an unguarded one.

签名
添加转换
    State Machine: State Machine
    源状态: 文本
    目标状态: 文本
    转换名称: 文本
    条件: Func<真否>
    优先级: 整数
void AddTransition(
    StateMachineApplication State Machine,
    string fromState,
    string toState,
    string transitionName,
    Func<bool> condition,
    int priority)

参数

名称类型默认值说明
State MachineState Machine—
源状态文本—The state this transition leaves.
目标状态文本—The state this transition enters (may equal From State - a self-transition).
转换名称文本—The authored display name, or null for an unnamed transition.
条件Func<真否>—Whether the transition fires, asked after each Update; null = always.
优先级整数—Higher evaluates first; see StateMachineApplication.OutgoingOf for the tie rule.
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
状态机
所属包
状态机

状态机名称

函数

What failure messages call this machine: the graph's name interpreted, set by the emitted
constructor compiled; the emitted type's name failing both.

签名
状态机名称(State Machine: State Machine) -> 文本
string MachineName(StateMachineApplication State Machine)

参数

名称类型默认值说明
State MachineState Machine—

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
状态机
所属包
状态机

已请求停止

函数

Whether StateMachineApplication.Stop has been called for the current run.

签名
已请求停止(State Machine: State Machine) -> 真否
bool StopRequested(StateMachineApplication State Machine)

参数

名称类型默认值说明
State MachineState Machine—

返回

结果真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
状态机
所属包
状态机

节拍调度器

函数

The tick scheduler the loop runs on; null (the default) means real time
(StateMachine.RealTimeTickScheduler). Settable so a test - or any host that owns time - can drive
the machine deterministically; this is the machine analogue of the recording-driver pattern.

签名
节拍调度器(State Machine: State Machine) -> I State Machine Tick Scheduler
IStateMachineTickScheduler TickScheduler(StateMachineApplication State Machine)

参数

名称类型默认值说明
State MachineState Machine—

返回

结果I State Machine Tick Scheduler
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
状态机
所属包
状态机

注册状态

函数

Declares one state: its name (the state graph's name), how to construct a FRESH instance of it -
entering a state always constructs anew, self-transitions included - and whether it is the initial
state.

签名
注册状态
    State Machine: State Machine
    状态名称: 文本
    工厂: Func<State Machine State>
    初始状态: 真否
void RegisterState(
    StateMachineApplication State Machine,
    string stateName,
    Func<StateMachineState> factory,
    bool isInitial = false)

参数

名称类型默认值说明
State MachineState Machine—
状态名称文本—
工厂Func<State Machine State>—
初始状态真否False
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
状态机
所属包
状态机

停止

函数

Ends the machine from anywhere: the loop stops at its next checkpoint - after the callback (or
condition) that called this returns - without exiting the active state. Callable from a state
(through StateMachineState.Stop), from a condition, or from another thread.

签名
停止(State Machine: State Machine)
void Stop(StateMachineApplication State Machine)

参数

名称类型默认值说明
State MachineState Machine—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
状态机
所属包
状态机