表示テーマ
Input
Inputは入力で使用する型です。下記にゲームコードから利用できる宣言を掲載します。
型の情報
- 名前空間:
NEMEngine - 型:
NEMEngine.Input(Class)
ConnectedGamepadCount
csharp
public static int ConnectedGamepadCount接続中のゲームパッド数です。
操作:読取専用。
GetGamepadAxis
csharp
public static float GetGamepadAxis(int index, GamepadAxis axis)dead zone 未適用の raw 軸値(stick は [-1,1]、trigger は [0,1])。dead zone は InputActions 側で適用する。
| 引数 | 型 | 既定値 |
|---|---|---|
index | int | 必須 |
axis | NEMEngine.GamepadAxis | 必須 |
戻り値:float。
GetGamepadButton
csharp
public static bool GetGamepadButton(GamepadButton button)単一 gamepad(index 0)向け convenience。
| 引数 | 型 | 既定値 |
|---|---|---|
button | NEMEngine.GamepadButton | 必須 |
戻り値:bool。
GetGamepadButton
csharp
public static bool GetGamepadButton(int index, GamepadButton button)ゲームパッドの指定ボタンの押下状態です。
| 引数 | 型 | 既定値 |
|---|---|---|
index | int | 必須 |
button | NEMEngine.GamepadButton | 必須 |
戻り値:bool。
GetGamepadButtonDown
csharp
public static bool GetGamepadButtonDown(GamepadButton button)このframeで押されたゲームパッドのボタンを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
button | NEMEngine.GamepadButton | 必須 |
戻り値:bool。
GetGamepadButtonDown
csharp
public static bool GetGamepadButtonDown(int index, GamepadButton button)このframeで押されたゲームパッドのボタンを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
index | int | 必須 |
button | NEMEngine.GamepadButton | 必須 |
戻り値:bool。
GetGamepadButtonUp
csharp
public static bool GetGamepadButtonUp(GamepadButton button)このframeで離されたゲームパッドのボタンを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
button | NEMEngine.GamepadButton | 必須 |
戻り値:bool。
GetGamepadButtonUp
csharp
public static bool GetGamepadButtonUp(int index, GamepadButton button)このframeで離されたゲームパッドのボタンを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
index | int | 必須 |
button | NEMEngine.GamepadButton | 必須 |
戻り値:bool。
GetKey
csharp
public static bool GetKey(KeyCode key)指定キーが現在押されているかを取得します。
| 引数 | 型 | 既定値 |
|---|---|---|
key | NEMEngine.KeyCode | 必須 |
戻り値:bool。
GetKeyDown
csharp
public static bool GetKeyDown(KeyCode key)このframeで押されたキーを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
key | NEMEngine.KeyCode | 必須 |
戻り値:bool。
GetKeyUp
csharp
public static bool GetKeyUp(KeyCode key)このframeで離されたキーを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
key | NEMEngine.KeyCode | 必須 |
戻り値:bool。
GetMouseButton
csharp
public static bool GetMouseButton(MouseButton button)指定したマウスボタンが押されているかを取得します。
| 引数 | 型 | 既定値 |
|---|---|---|
button | NEMEngine.MouseButton | 必須 |
戻り値:bool。
GetMouseButton
csharp
public static bool GetMouseButton(int button)int overload(0=Left, 1=Right, 2=Middle)
| 引数 | 型 | 既定値 |
|---|---|---|
button | int | 必須 |
戻り値:bool。
GetMouseButtonDown
csharp
public static bool GetMouseButtonDown(MouseButton button)このframeで押したマウスボタンを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
button | NEMEngine.MouseButton | 必須 |
戻り値:bool。
GetMouseButtonDown
csharp
public static bool GetMouseButtonDown(int button)このframeで押したマウスボタンを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
button | int | 必須 |
戻り値:bool。
GetMouseButtonUp
csharp
public static bool GetMouseButtonUp(MouseButton button)このframeで離したマウスボタンを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
button | NEMEngine.MouseButton | 必須 |
戻り値:bool。
GetMouseButtonUp
csharp
public static bool GetMouseButtonUp(int button)このframeで離したマウスボタンを判定します。
| 引数 | 型 | 既定値 |
|---|---|---|
button | int | 必須 |
戻り値:bool。
HasFocus
csharp
public static bool HasFocusウィンドウがフォーカスを持っているか
操作:読取専用。
IsGamepadConnected
csharp
public static bool IsGamepadConnected(int index)--------- 多 gamepad(最大4台)/ text / focus ----------------------------
| 引数 | 型 | 既定値 |
|---|---|---|
index | int | 必須 |
戻り値:bool。
TextInput
csharp
public static string TextInputこのフレームに入力された文字列(frame-local。確定文字のみ)
操作:読取専用。
inputType
csharp
public static InputType inputType最後に操作された入力デバイスタイプ
操作:読取専用。
isGamepadConnected
csharp
public static bool isGamepadConnected先頭ゲームパッドの接続状態です。
操作:読取専用。
leftStick
csharp
public static Vector2 leftStick先頭ゲームパッドの左スティックの2軸値です。
操作:読取専用。
leftTrigger
csharp
public static float leftTrigger先頭ゲームパッドの左トリガー値です。
操作:読取専用。
mouseDelta
csharp
public static Vector2 mouseDeltaこのframeのマウス移動量です。
操作:読取専用。
mousePosition
csharp
public static Vector2 mousePositionゲームView内でのマウス位置です。
操作:読取専用。
mouseRangeControl
csharp
public static bool mouseRangeControlマウス移動範囲制御のON/OFF
操作:読取・変更。
mouseWheel
csharp
public static float mouseWheelこのframeのマウスホイール移動量です。
操作:読取専用。
rightStick
csharp
public static Vector2 rightStick先頭ゲームパッドの右スティックの2軸値です。
操作:読取専用。
rightTrigger
csharp
public static float rightTrigger先頭ゲームパッドの右トリガー値です。
操作:読取専用。
実行時の扱い
Nativeと接続する操作は、Scriptが実行される有効なWorld内で使用します。破棄したGameObjectやComponentへのアクセスは避けてください。設定Snapshotは取得・編集・反映を1組で扱います。