元编程参考文档

输入映射

13 个节点

本页内容 13

输入映射

函数

此节点没有文档说明。

签名
输入映射() -> Input Map
InputMap InputMap()

返回

输入映射Input Map
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
输入映射
所属包
Glaze 实时

绑定

函数

Make a key mean an intent.

签名
绑定(Input Map: Input Map, 意图: 文本, 键: Keyboard Key)
void Bind(InputMap Input Map, string intent, KeyboardKey key)

参数

名称类型默认值说明
Input MapInput Map—
意图文本—
键Keyboard Key—

备注

Takes the key away from whatever it meant before. Binding the same key to the same intent twice is a
no-op rather than a duplicate.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
输入映射
所属包
Glaze 实时

指定位置的绑定

函数

One of the keys that mean this intent, in the order they were bound.

签名
指定位置的绑定 -> Keyboard Key
    Input Map: Input Map
    意图: 文本
    索引: 整数
KeyboardKey BindingAt(
    InputMap Input Map,
    string intent,
    int index)

参数

名称类型默认值说明
Input MapInput Map—
意图文本—
索引整数—

返回

结果Keyboard Key

备注

Answers Unrecognized out of range - the framework's own word for "not a key I
name" - rather than throwing, so a rebinding screen can walk past the end without counting first.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
输入映射
所属包
Glaze 实时

绑定数

函数

How many keys mean this intent.

签名
绑定数(Input Map: Input Map, 意图: 文本) -> 整数
int BindingCount(InputMap Input Map, string intent)

参数

名称类型默认值说明
Input MapInput Map—
意图文本—

返回

结果整数
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
输入映射
所属包
Glaze 实时

意图数

函数

How many intents have ever been named.

签名
意图数(Input Map: Input Map) -> 整数
int IntentCount(InputMap Input Map)

参数

名称类型默认值说明
Input MapInput Map—

返回

结果整数

备注

Includes an intent whose keys were all taken away, because a rebinding screen still has a row
for an action bound to nothing - that is the row the player uses to bind it.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
输入映射
所属包
Glaze 实时

指定位置的意图

函数

An intent by position, in the order they were first named.

签名
指定位置的意图(Input Map: Input Map, 索引: 整数) -> 文本
string IntentAt(InputMap Input Map, int index)

参数

名称类型默认值说明
Input MapInput Map—
索引整数—

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
输入映射
所属包
Glaze 实时

键对应的意图

函数

What this key means, or empty if it means nothing.

签名
键对应的意图(Input Map: Input Map, 键: Keyboard Key) -> 文本
string IntentFor(InputMap Input Map, KeyboardKey key)

参数

名称类型默认值说明
Input MapInput Map—
键Keyboard Key—

返回

结果文本

备注

Empty rather than null, so that a graph comparing the answer to a name works without a null check and
a C# caller can use it in a switch. An unbound key is the normal case, not an error - a keyboard
has a hundred keys and a game names four.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
输入映射
所属包
Glaze 实时

是否已绑定

函数

Whether this intent has any key at all.

签名
是否已绑定(Input Map: Input Map, 意图: 文本) -> 真否
bool IsBound(InputMap Input Map, string intent)

参数

名称类型默认值说明
Input MapInput Map—
意图文本—

返回

结果真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
输入映射
所属包
Glaze 实时

是否按下

函数

Whether any key bound to this intent is being held.

签名
是否按下 -> 真否
    Input Map: Input Map
    意图: 文本
    应用: Realtime Application
bool IsDown(
    InputMap Input Map,
    string intent,
    RealtimeApplication application)

参数

名称类型默认值说明
Input MapInput Map—
意图文本—
应用Realtime Application—The application to ask, which is the thing holding the service provider that knows about the keyboard.

返回

结果真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
输入映射
所属包
Glaze 实时

意图是否触发

函数

Whether this key currently means this intent.

签名
意图是否触发 -> 真否
    Input Map: Input Map
    键: Keyboard Key
    意图: 文本
bool Means(InputMap Input Map, KeyboardKey key, string intent)

参数

名称类型默认值说明
Input MapInput Map—
键Keyboard Key—
意图文本—

返回

结果真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
输入映射
所属包
Glaze 实时

重新绑定

函数

Make this the ONLY key for an intent.

签名
重新绑定(Input Map: Input Map, 意图: 文本, 键: Keyboard Key)
void Rebind(InputMap Input Map, string intent, KeyboardKey key)

参数

名称类型默认值说明
Input MapInput Map—
意图文本—
键Keyboard Key—

备注

What a rebinding screen commits: the player chose a key for an action, and the action's old
keys stop working.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
输入映射
所属包
Glaze 实时

释放

函数

Take one key away from whatever it meant.

签名
释放(Input Map: Input Map, 键: Keyboard Key) -> 真否
bool Release(InputMap Input Map, KeyboardKey key)

参数

名称类型默认值说明
Input MapInput Map—
键Keyboard Key—

返回

已移除真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
输入映射
所属包
Glaze 实时

解除绑定

函数

Take every key away from an intent, leaving it bound to nothing.

签名
解除绑定(Input Map: Input Map, 意图: 文本)
void Unbind(InputMap Input Map, string intent)

参数

名称类型默认值说明
Input MapInput Map—
意图文本—
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
输入映射
所属包
Glaze 实时