// Use this for initialization void Start() { //input.ChangePlConkind(0, PlInput.ConKind.KEYBOARD2); // input.ChangePlConkind(1, PlInput.ConKind.KEYBOARD1); Debug.Log("Player[0].ConKind is " + PlInput.GetConKind(0)); Debug.Log("Player[1].ConKind is " + PlInput.GetConKind(1)); //入力方法の初期化 //今はとりあえずConKind.KEYBOARD1で if (PlInput.GetConKind(0) == PlInput.ConKind.NOTHING) { input.ChangePlConkind(0, PlInput.ConKind.KEYBOARD1);//移動がwasd,回転がK、L、ホールドがスペース PlInput.Player[0].JoyConNum = -1; } if (PlInput.GetConKind(1) == PlInput.ConKind.NOTHING) { input.ChangePlConkind(1, PlInput.ConKind.KEYBOARD2);//移動がwasd,回転がK、L、ホールドがスペース PlInput.Player[1].JoyConNum = -1; } }
public void Reconect2() { var ConImg = GameObject.Find("/Canvas/Panel2/ConImg2").GetComponent <Image>(); if (PlInput.GetConKind(1) == PlInput.ConKind.NOTHING) { if (Input.GetKeyDown(KeyCode.L)) { In.ChangePlConkind(1, PlInput.ConKind.KEYBOARD1); SE_Submit.PlayOneShot(SE_Submit.clip); ConImg.sprite = KeyBoard1; } if (Input.GetKeyDown(KeyCode.X)) { In.ChangePlConkind(1, PlInput.ConKind.KEYBOARD2); SE_Submit.PlayOneShot(SE_Submit.clip); ConImg.sprite = KeyBoard2; } for (int i = 0; i < 4; i++) { if (GamePad.GetButtonDown(GamePad.Button.B, (GamePad.Index)i)) { In.ChangePlConkind(1, PlInput.ConKind.JOYCON); SE_Submit.PlayOneShot(SE_Submit.clip); PlInput.Player[1].JoyConNum = i; ConImg.sprite = JoyCon; } } } else if (PlInput.GetConKind(1) != PlInput.ConKind.NOTHING) { In.ChangePlConkind(1, PlInput.ConKind.NOTHING); PlInput.Player[1].JoyConNum = -1; SE_Cancel.PlayOneShot(SE_Cancel.clip); ConImg.sprite = Nothing; } Debug.Log("Player[1].ConKind is " + PlInput.GetConKind(1)); }
public void ShowConKind() { Debug.Log("Player[0].ConKind is " + PlInput.GetConKind(0)); Debug.Log("Player[1].ConKind is " + PlInput.GetConKind(1)); }