/** ジョイスティック。左スティックY。 */ public void CreateLeftStickAxisY(int a_pad_index, Fee.Input.Pad_InputManagerItemName.PadType a_pad_type) { this.m_Name = Fee.Input.Config.INPUTMANAGER_LSY.GetItem(a_pad_index, a_pad_type); this.descriptiveName = ""; this.descriptiveNegativeName = ""; this.negativeButton = ""; this.positiveButton = ""; this.altNegativeButton = ""; this.altPositiveButton = ""; this.gravity = 0.0f; this.dead = 0.1f; this.sensitivity = 1.0f; this.snap = false; this.invert = true; this.type = Type.JoyStickAxis; this.axis = Axis.YAxis; this.joyNum = a_pad_index + 1; }
/** ジョイスティック。右トリガー1ボタン。 */ public void CreateRightTrigger1Button(int a_pad_index, Fee.Input.Pad_InputManagerItemName.PadType a_pad_type) { this.m_Name = Fee.Input.Config.INPUTMANAGER_RT1.GetItem(a_pad_index, a_pad_type); this.descriptiveName = ""; this.descriptiveNegativeName = ""; this.negativeButton = ""; this.positiveButton = "joystick " + (a_pad_index + 1).ToString() + " button 5"; this.altNegativeButton = ""; this.altPositiveButton = ""; this.gravity = 0.0f; this.dead = 0.001f; this.sensitivity = 1.0f; this.snap = false; this.invert = false; this.type = Type.KeyOrMouseButton; this.axis = Axis.None; this.joyNum = a_pad_index + 1; }
private static void MenuItem_InitializeInputManager() { Fee_InputManagerTool t_inputmaanger = new Fee_InputManagerTool(); { System.Collections.Generic.List <Fee_InputManagerTool_Item> t_list = t_inputmaanger.GetList(); System.Collections.Generic.Dictionary <string, Fee_InputManagerTool_Item> t_flag_list = new System.Collections.Generic.Dictionary <string, Fee_InputManagerTool_Item>(); { for (int t_pad_index = 0; t_pad_index < Fee.Input.Config.PAD_MAX; t_pad_index++) { for (Fee.Input.Pad_InputManagerItemName.PadType t_pad_type = 0; t_pad_type < Fee.Input.Pad_InputManagerItemName.PadType.Max; t_pad_type++) { //トリガー。 { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateLeftTrigger1Button(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_LT1.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateRightTrigger1Button(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_RT1.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateLeftTrigger2Button(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_LT2.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateRightTrigger2Button(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_RT2.GetItem(t_pad_index, t_pad_type), t_item); } //ボタン。 { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateDigitalButtonLeft(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_LEFT.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateDigitalButtonRight(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_RIGHT.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateDigitalButtonUp(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_UP.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateDigitalButtonDown(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_DOWN.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateDigitalButtonEnter(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_ENTER.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateDigitalButtonEscape(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_ESCAPE.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateDigitalButtonSub1(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_SUB1.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateDigitalButtonSub2(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_SUB2.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateDigitalButtonLeftMenu(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_LMENU.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateDigitalButtonRightMenu(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_RMENU.GetItem(t_pad_index, t_pad_type), t_item); } //スティック。 { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateLeftStickAxisX(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_LSX.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateLeftStickAxisY(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_LSY.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateRightStickAxisX(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_RSX.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateRightStickAxisY(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_RSY.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateLeftStickButton(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_LSB.GetItem(t_pad_index, t_pad_type), t_item); } { Fee_InputManagerTool_Item t_item = new Fee_InputManagerTool_Item(); t_item.CreateRightStickButton(t_pad_index, t_pad_type); t_flag_list.Add(Fee.Input.Config.INPUTMANAGER_RSB.GetItem(t_pad_index, t_pad_type), t_item); } } } } //すでにリストに存在しているものはリストから外す。 for (int ii = 0; ii < t_list.Count; ii++) { Fee_InputManagerTool_Item t_item; if (t_flag_list.TryGetValue(t_list[ii].m_Name, out t_item) == true) { //すでに存在している。 t_flag_list[t_list[ii].m_Name] = null; } } //リストに追加。 foreach (System.Collections.Generic.KeyValuePair <string, Fee_InputManagerTool_Item> t_pair in t_flag_list) { if (t_pair.Value != null) { t_list.Add(t_pair.Value); } } } //セーブ。 t_inputmaanger.Save(); }
/** ジョイスティック。左スティックボタン。 */ public void CreateLeftStickButton(int a_pad_index, Fee.Input.Pad_InputManagerItemName.PadType a_pad_type) { this.m_Name = Fee.Input.Config.INPUTMANAGER_LSB.GetItem(a_pad_index, a_pad_type); switch (a_pad_type) { case Fee.Input.Pad_InputManagerItemName.PadType.Type_P: { this.descriptiveName = ""; this.descriptiveNegativeName = ""; this.negativeButton = ""; this.positiveButton = "joystick " + (a_pad_index + 1).ToString() + " button 10"; this.altNegativeButton = ""; this.altPositiveButton = ""; this.gravity = 0.0f; this.dead = 0.001f; this.sensitivity = 1.0f; this.snap = false; this.invert = false; this.type = Type.KeyOrMouseButton; this.axis = Axis.None; this.joyNum = a_pad_index + 1; } break; case Fee.Input.Pad_InputManagerItemName.PadType.Type_X: { this.descriptiveName = ""; this.descriptiveNegativeName = ""; this.negativeButton = ""; this.positiveButton = "joystick " + (a_pad_index + 1).ToString() + " button 8"; this.altNegativeButton = ""; this.altPositiveButton = ""; this.gravity = 0.0f; this.dead = 0.001f; this.sensitivity = 1.0f; this.snap = false; this.invert = false; this.type = Type.KeyOrMouseButton; this.axis = Axis.None; this.joyNum = a_pad_index + 1; } break; case Fee.Input.Pad_InputManagerItemName.PadType.Type_A: { this.descriptiveName = ""; this.descriptiveNegativeName = ""; this.negativeButton = ""; this.positiveButton = "joystick " + (a_pad_index + 1).ToString() + " button 8"; this.altNegativeButton = ""; this.altPositiveButton = ""; this.gravity = 0.0f; this.dead = 0.001f; this.sensitivity = 1.0f; this.snap = false; this.invert = false; this.type = Type.KeyOrMouseButton; this.axis = Axis.None; this.joyNum = a_pad_index + 1; } break; } }
/** ジョイスティック。右スティックY。 */ public void CreateRightStickAxisY(int a_pad_index, Fee.Input.Pad_InputManagerItemName.PadType a_pad_type) { this.m_Name = Fee.Input.Config.INPUTMANAGER_RSY.GetItem(a_pad_index, a_pad_type); switch (a_pad_type) { case Fee.Input.Pad_InputManagerItemName.PadType.Type_P: { this.descriptiveName = ""; this.descriptiveNegativeName = ""; this.negativeButton = ""; this.positiveButton = ""; this.altNegativeButton = ""; this.altPositiveButton = ""; this.gravity = 0.0f; this.dead = 0.1f; this.sensitivity = 1.0f; this.snap = false; this.invert = true; this.type = Type.JoyStickAxis; this.axis = Axis.Axis6; this.joyNum = a_pad_index + 1; } break; case Fee.Input.Pad_InputManagerItemName.PadType.Type_X: { this.descriptiveName = ""; this.descriptiveNegativeName = ""; this.negativeButton = ""; this.positiveButton = ""; this.altNegativeButton = ""; this.altPositiveButton = ""; this.gravity = 0.0f; this.dead = 0.1f; this.sensitivity = 1.0f; this.snap = false; this.invert = true; this.type = Type.JoyStickAxis; this.axis = Axis.Axis5; this.joyNum = a_pad_index + 1; } break; case Fee.Input.Pad_InputManagerItemName.PadType.Type_A: { this.descriptiveName = ""; this.descriptiveNegativeName = ""; this.negativeButton = ""; this.positiveButton = ""; this.altNegativeButton = ""; this.altPositiveButton = ""; this.gravity = 0.0f; this.dead = 0.1f; this.sensitivity = 1.0f; this.snap = false; this.invert = true; this.type = Type.JoyStickAxis; this.axis = Axis.Axis4; this.joyNum = a_pad_index + 1; } break; } }