元編程參考文件

輸入對映

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 即時