/// <summary> /// パッド接続確認 /// </summary> protected void GamePadCheck() { if (!flagInputTypeHold) { string[] joyNames = Input.GetJoystickNames(); if (joyNames.Length == 0) { inputType = ToolBox.InputType.Mouse; } else { inputType = ToolBox.InputType.GamePad; } } }
/// <summary> /// ゲームパッド設定 /// </summary> public void SetGamePad(int number, ToolBox.InputType inputType, bool flagInputTypeHold) { //プレイヤー番号 switch (number) { case (0): playerNo = GamePad.Index.Any; break; case (1): playerNo = GamePad.Index.One; break; case (2): playerNo = GamePad.Index.Two; break; case (3): playerNo = GamePad.Index.Three; break; case (4): playerNo = GamePad.Index.Four; break; } //その他の設定 this.inputType = inputType; this.flagInputTypeHold = flagInputTypeHold; }