/** Main */ public static bool Main(int a_index) { try{ //is_focus bool t_is_focus = Fee.Input.Input.GetInstance().is_focus; //pad_index int t_pad_index = Fee.Input.Input.GetInstance().pad.status[a_index].pad_index; //pad_type Pad_InputManagerItemName.PadType t_pad_type = Fee.Input.Input.GetInstance().pad.status[a_index].pad_type; //デバイス。 bool t_l_1 = UnityEngine.Input.GetButton(Config.INPUTMANAGER_LT1.GetItem(t_pad_index, t_pad_type)); bool t_r_1 = UnityEngine.Input.GetButton(Config.INPUTMANAGER_RT1.GetItem(t_pad_index, t_pad_type)); float t_l_2 = UnityEngine.Input.GetAxis(Config.INPUTMANAGER_LT2.GetItem(t_pad_index, t_pad_type)); float t_r_2 = UnityEngine.Input.GetAxis(Config.INPUTMANAGER_RT2.GetItem(t_pad_index, t_pad_type)); if (t_l_2 < 0.0f) { t_l_2 = 0.0f; } if (t_r_2 < 0.0f) { t_r_2 = 0.0f; } //設定。 Fee.Input.Input.GetInstance().pad.status[a_index].l_trigger_1.Set(t_l_1 & t_is_focus); Fee.Input.Input.GetInstance().pad.status[a_index].r_trigger_1.Set(t_r_1 & t_is_focus); if (t_is_focus == true) { Fee.Input.Input.GetInstance().pad.status[a_index].l_trigger_2.Set(t_l_2); Fee.Input.Input.GetInstance().pad.status[a_index].r_trigger_2.Set(t_r_2); } else { Fee.Input.Input.GetInstance().pad.status[a_index].l_trigger_2.Set(0.0f); Fee.Input.Input.GetInstance().pad.status[a_index].r_trigger_2.Set(0.0f); } //debugview #if (UNITY_EDITOR) || (DEVELOPMENT_BUILD) || (USE_DEF_FEE_DEBUGTOOL) { Fee.Input.Input.GetInstance().debugview.pad_trigger = "Pad_Trigger_InputManager_InputName"; } #endif return(true); }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); } return(false); }
/** Main */ public static bool Main(int a_index) { try{ //is_focus bool t_is_focus = Fee.Input.Input.GetInstance().is_focus; //pad_index int t_pad_index = Fee.Input.Input.GetInstance().pad.status[a_index].pad_index; //pad_type Pad_InputManagerItemName.PadType t_pad_type = Fee.Input.Input.GetInstance().pad.status[a_index].pad_type; bool t_left_on = (UnityEngine.Input.GetAxis(Config.INPUTMANAGER_LEFT.GetItem(t_pad_index, t_pad_type)) < -0.5f) ? true : false; bool t_right_on = (UnityEngine.Input.GetAxis(Config.INPUTMANAGER_RIGHT.GetItem(t_pad_index, t_pad_type)) > 0.5f) ? true : false; bool t_up_on = (UnityEngine.Input.GetAxis(Config.INPUTMANAGER_UP.GetItem(t_pad_index, t_pad_type)) > 0.5f) ? true : false; bool t_down_on = (UnityEngine.Input.GetAxis(Config.INPUTMANAGER_DOWN.GetItem(t_pad_index, t_pad_type)) < -0.5f) ? true : false; bool t_enter_on = UnityEngine.Input.GetButton(Config.INPUTMANAGER_ENTER.GetItem(t_pad_index, t_pad_type)); bool t_escape_on = UnityEngine.Input.GetButton(Config.INPUTMANAGER_ESCAPE.GetItem(t_pad_index, t_pad_type)); bool t_sub1_on = UnityEngine.Input.GetButton(Config.INPUTMANAGER_SUB1.GetItem(t_pad_index, t_pad_type)); bool t_sub2_on = UnityEngine.Input.GetButton(Config.INPUTMANAGER_SUB2.GetItem(t_pad_index, t_pad_type)); bool t_left_menu_on = UnityEngine.Input.GetButton(Config.INPUTMANAGER_LMENU.GetItem(t_pad_index, t_pad_type)); bool t_right_menu_on = UnityEngine.Input.GetButton(Config.INPUTMANAGER_RMENU.GetItem(t_pad_index, t_pad_type)); //設定。 Fee.Input.Input.GetInstance().pad.status[a_index].left.Set(t_left_on & t_is_focus); Fee.Input.Input.GetInstance().pad.status[a_index].right.Set(t_right_on & t_is_focus); Fee.Input.Input.GetInstance().pad.status[a_index].up.Set(t_up_on & t_is_focus); Fee.Input.Input.GetInstance().pad.status[a_index].down.Set(t_down_on & t_is_focus); Fee.Input.Input.GetInstance().pad.status[a_index].enter.Set(t_enter_on & t_is_focus); Fee.Input.Input.GetInstance().pad.status[a_index].escape.Set(t_escape_on & t_is_focus); Fee.Input.Input.GetInstance().pad.status[a_index].sub1.Set(t_sub1_on & t_is_focus); Fee.Input.Input.GetInstance().pad.status[a_index].sub2.Set(t_sub2_on & t_is_focus); Fee.Input.Input.GetInstance().pad.status[a_index].left_menu.Set(t_left_menu_on & t_is_focus); Fee.Input.Input.GetInstance().pad.status[a_index].right_menu.Set(t_right_menu_on & t_is_focus); //debugview #if (UNITY_EDITOR) || (DEVELOPMENT_BUILD) || (USE_DEF_FEE_DEBUGTOOL) { Fee.Input.Input.GetInstance().debugview.pad_button = "Pad_Button_InputManager_InputName"; } #endif return(true); }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); } return(false); }
/** Main */ public static bool Main(int a_index) { try{ //is_focus bool t_is_focus = Fee.Input.Input.GetInstance().is_focus; //pad_index int t_pad_index = Fee.Input.Input.GetInstance().pad.status[a_index].pad_index; //pad_type Pad_InputManagerItemName.PadType t_pad_type = Fee.Input.Input.GetInstance().pad.status[a_index].pad_type; //デバイス。 float t_l_x = UnityEngine.Input.GetAxis(Config.INPUTMANAGER_LSX.GetItem(t_pad_index, t_pad_type)); float t_l_y = UnityEngine.Input.GetAxis(Config.INPUTMANAGER_LSY.GetItem(t_pad_index, t_pad_type)); float t_r_x = UnityEngine.Input.GetAxis(Config.INPUTMANAGER_RSX.GetItem(t_pad_index, t_pad_type)); float t_r_y = UnityEngine.Input.GetAxis(Config.INPUTMANAGER_RSY.GetItem(t_pad_index, t_pad_type)); bool t_l_on = UnityEngine.Input.GetButton(Config.INPUTMANAGER_LSB.GetItem(t_pad_index, t_pad_type)); bool t_r_on = UnityEngine.Input.GetButton(Config.INPUTMANAGER_RSB.GetItem(t_pad_index, t_pad_type)); //設定。 if (t_is_focus == true) { Fee.Input.Input.GetInstance().pad.status[a_index].l_stick.Set(t_l_x, t_l_y); Fee.Input.Input.GetInstance().pad.status[a_index].r_stick.Set(t_r_x, t_r_y); } else { Fee.Input.Input.GetInstance().pad.status[a_index].l_stick.Set(0.0f, 0.0f); Fee.Input.Input.GetInstance().pad.status[a_index].r_stick.Set(0.0f, 0.0f); } Fee.Input.Input.GetInstance().pad.status[a_index].l_stick_button.Set(t_l_on & t_is_focus); Fee.Input.Input.GetInstance().pad.status[a_index].r_stick_button.Set(t_r_on & t_is_focus); //debugview #if (UNITY_EDITOR) || (DEVELOPMENT_BUILD) || (USE_DEF_FEE_DEBUGTOOL) { Fee.Input.Input.GetInstance().debugview.pad_stick = "Pad_Stick_InputManager_InputName"; } #endif return(true); }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); } return(false); }
/** GetItem */ public string GetItem(int a_pad_index, Pad_InputManagerItemName.PadType a_pad_type) { return(this.pad_list[a_pad_index].type_list[(int)a_pad_type].name); }