Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     Input = GetComponent <PlInput>();                    //InputだとunityのInputと混じってめんどそうなので適当に名前いじってください。
     //ConKindは初期状態ではNOTHINGにしてあるので変更する
     Input.ChangePlConkind(0, PlInput.ConKind.KEYBOARD1); //移動がwasd,回転が←、→、ホールドがスペース
     Input.ChangePlConkind(1, PlInput.ConKind.JOYCON);    //移動が矢印、zxで回転、ホールドがスペース
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     PI = GetComponent <PlInput>();
     Debug.Log("Game's Start");
     PI.ChangePlConkind(0, PlInput.ConKind.KEYBOARD1);
     PI.ChangePlConkind(1, PlInput.ConKind.KEYBOARD2);
     Debug.Log(PlInput.Player[0].ConKind);
     Debug.Log(PlInput.Player[1].ConKind);
 }
Ejemplo n.º 3
0
 // 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;
     }
 }
Ejemplo n.º 4
0
    public void Reconect1()
    {
        var ConImg = GameObject.Find("/Canvas/Panel/ConImage").GetComponent <Image>();

        if (PlInput.Player[0].ConKind == PlInput.ConKind.NOTHING)
        {
            if (Input.GetKeyDown(KeyCode.L))
            {
                In.ChangePlConkind(0, PlInput.ConKind.KEYBOARD1);
                SE_Submit.PlayOneShot(SE_Submit.clip);
                ConImg.sprite = KeyBoard1;
            }
            if (Input.GetKeyDown(KeyCode.X))
            {
                In.ChangePlConkind(0, 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(0, PlInput.ConKind.JOYCON);
                    PlInput.Player[0].JoyConNum = i;
                    SE_Submit.PlayOneShot(SE_Submit.clip);
                    ConImg.sprite = JoyCon;
                }
            }
        }
        else if (PlInput.Player[0].ConKind != PlInput.ConKind.NOTHING)
        {
            In.ChangePlConkind(0, PlInput.ConKind.NOTHING);
            PlInput.Player[0].JoyConNum = -1;
            SE_Cancel.PlayOneShot(SE_Cancel.clip);
            ConImg.sprite = Nothing;
        }
        // Debug.Log("Player[0].ConKind is " + PlInput.Player[0].ConKind);
    }
Ejemplo n.º 5
0
    private void Start()
    {//コントローラー初期化等
        Debug.Log("ConConect2 Start");
        reconect1.Select();
        var ConImg1 = GameObject.Find("/Canvas/Panel1/ConImg1").GetComponent <Image>();

        In.ChangePlConkind(0, PlInput.ConKind.NOTHING);
        PlInput.Player[0].JoyConNum = -1;
        ConImg1.sprite = Nothing;
        var ConImg2 = GameObject.Find("/Canvas/Panel2/ConImg2").GetComponent <Image>();

        In.ChangePlConkind(1, PlInput.ConKind.NOTHING);
        PlInput.Player[1].JoyConNum = -1;
        ConImg2.sprite = Nothing;
        In.ChangePlConkind(0, PlInput.ConKind.NOTHING);
        In.ChangePlConkind(1, PlInput.ConKind.NOTHING);
    }