void Update() { g_timer -= Time.deltaTime; if (g_timer > 0) { return; } if (g_pushStart_Script.g_start_flag == false) { if (Input.GetKeyDown(KeyCode.Return) || Input.GetButton("A")) { g_timer = g_start_timer; g_player_move_Script.Dice_Push(); } if (Input.GetButtonDown("Y")) { g_undo_Script.Undo_Play(); } if (Input.GetButtonDown("Y")) { g_y_push_flag = true; } if (Input.GetButtonUp("Y") && g_y_push_flag) { g_y_push_flag = false; } if (Input.GetButtonDown("X")) { ChangeXFlag(); } if (Input.GetButtonUp("X") && g_xPushFlag) { ChangeXFlag(); } //配列hの上限に達してない時移動(上) if (Input.GetKeyDown(KeyCode.W) || (Input.GetAxisRaw("Vertical") > g_controller_Move && g_axis_flag == false)) { g_player_move_Script.PlayerMove(g_camera_para[0]); Axis_True(); } //配列hの下限に達してない時移動(下) if (Input.GetKeyDown(KeyCode.S) || (Input.GetAxisRaw("Vertical") < -g_controller_Move && g_axis_flag == false)) { g_player_move_Script.PlayerMove(g_camera_para[2]); Axis_True(); } //配列vの下限に達してない時移動(左) if (Input.GetKeyDown(KeyCode.A) || (Input.GetAxisRaw("Horizontal") < -g_controller_Move && g_axis_flag == false)) { g_player_move_Script.PlayerMove(g_camera_para[3]); Axis_True(); } //配列vの上限に達してない時移動(右) if (Input.GetKeyDown(KeyCode.D) || (Input.GetAxisRaw("Horizontal") > g_controller_Move && g_axis_flag == false)) { g_player_move_Script.PlayerMove(g_camera_para[1]); Axis_True(); } //スティックが戻されたとき if (Input.GetAxisRaw("Vertical") > -g_limit_num && Input.GetAxisRaw("Vertical") < g_limit_num && Input.GetAxisRaw("Horizontal") < g_limit_num && Input.GetAxisRaw("Horizontal") > -g_limit_num) { g_player_move_Script.Auto_Move_Flag_False(); g_axis_flag = false; } //スティックが一定の範囲に入った時 if (Input.GetAxisRaw("Vertical") > g_controller_Move || Input.GetAxisRaw("Vertical") < -g_controller_Move) { if (Input.GetAxisRaw("Horizontal") != 0) { g_player_move_Script.Auto_Move_Flag_False(); g_axis_flag = false; } } if (Input.GetAxisRaw("Horizontal") < -g_controller_Move || Input.GetAxisRaw("Horizontal") > g_controller_Move) { if (Input.GetAxisRaw("Vertical") != 0) { g_player_move_Script.Auto_Move_Flag_False(); g_axis_flag = false; } } } }