/// <summary> /// コントローラー入力 /// </summary> /// <param name="con"></param> private void ControllerInput(GameController con) { if (con.MoveDown(Direction.Front)) { // SE Util.Sound.SoundManager.Instance.PlayOneShot(AudioKey.sy_arrow_move); SelectChange(-1); } if (con.MoveDown(Direction.Back)) { // SE Util.Sound.SoundManager.Instance.PlayOneShot(AudioKey.sy_arrow_move); SelectChange(1); } if (con.ButtonDown(Button.A)) { StartCoroutine(ItemCorutine(_itemData[_selectIndex])); } }
// Update is called once per frame void Update() { if (con.GetConnectFlag()) { if (con.ButtonDown(Play.Button.A)) { Debug.Log("A"); } if (con.ButtonDown(Play.Button.B)) { Debug.Log("B"); } if (con.ButtonDown(Play.Button.X)) { Debug.Log("X"); } if (con.ButtonDown(Play.Button.Y)) { Debug.Log("Y"); } if (con.ButtonDown(Play.Button.L1)) { Debug.Log("L1"); } if (con.ButtonDown(Play.Button.R1)) { Debug.Log("R1"); } if (con.ButtonDown(Play.Button.BACK)) { Debug.Log("BACK"); } if (con.ButtonDown(Play.Button.START)) { Debug.Log("START"); } if (con.ButtonDown(Play.Button.L3)) { Debug.Log("L3"); } if (con.ButtonDown(Play.Button.R3)) { Debug.Log("R3"); } // バグになる呼び出し if (con.ButtonDown(Play.Button.R3 + 1)) { Debug.Log("R3"); } if (con.Move(Direction.Front)) { Debug.Log("UP"); } if (con.Move(Direction.Back)) { Debug.Log("DOWN"); } if (con.Move(Direction.Left)) { Debug.Log("LEFT"); } if (con.Move(Direction.Right)) { Debug.Log("RIGHT"); } } else { Debug.Log("つっかえ!"); } }