Esempio n. 1
0
 public void DefaultClicked()
 {
     CustomInput.DefaultKey();
     Attack.text      = CustomInput.KeyBoardAttack.ToString();
     Block.text       = CustomInput.KeyBoardBlock.ToString();
     Jump.text        = CustomInput.KeyBoardJump.ToString();
     CycleLeft.text   = CustomInput.KeyBoardCycleLeft.ToString();
     CycleRight.text  = CustomInput.KeyBoardCycleRight.ToString();
     Left.text        = CustomInput.KeyBoardLeft.ToString() + " / Left Arrow";
     Right.text       = CustomInput.KeyBoardRight.ToString() + " / Right Arrow";
     ChangeColor.text = CustomInput.KeyBoardChangeColor.ToString();
     Up.text          = CustomInput.KeyBoardUp.ToString() + " / Up Arrow";
     Down.text        = CustomInput.KeyBoardDown.ToString() + " / Down Arrow";
     Super.text       = CustomInput.KeyBoardSuper.ToString();
     Accept.text      = CustomInput.KeyBoardAccept.ToString();
     Cancel.text      = CustomInput.KeyBoardCancel.ToString();
     Pause.text       = CustomInput.KeyBoardPause.ToString();
 }
Esempio n. 2
0
 void Update()
 {
     ControlBinderStateMachine.State prevState = currState;
     if (running)
     {
         bool accept = CustomInput.AcceptFreshPressDeleteOnRead;
         currState = machine.update(accept);
         if (prevState != currState)
         {
             foreach (GameObject g in cursors)
             {
                 g.SetActive(false);
             }
             int cursor = (int)currState - 1;
             if (cursor >= 0 && cursor < 16)
             {
                 cursors[cursor].SetActive(true);
             }
             else if (currState == ControlBinderStateMachine.State.Prep)
             {
                 Kernel.disalble();
             }
             else if (prevState == ControlBinderStateMachine.State.Holding)
             {
                 Kernel.enalble();
             }
         }
         if (accept)
         {
             if (currState == ControlBinderStateMachine.State.Default)
             {
                 CustomInput.DefaultKey();
                 Attack.text      = CustomInput.KeyBoardAttack.ToString();
                 Block.text       = CustomInput.KeyBoardBlock.ToString();
                 Jump.text        = CustomInput.KeyBoardJump.ToString();
                 CycleLeft.text   = CustomInput.KeyBoardCycleLeft.ToString();
                 CycleRight.text  = CustomInput.KeyBoardCycleRight.ToString();
                 Left.text        = CustomInput.KeyBoardLeft.ToString() + " / Left Arrow";
                 Right.text       = CustomInput.KeyBoardRight.ToString() + " / Right Arrow";
                 ChangeColor.text = CustomInput.KeyBoardChangeColor.ToString();
                 Up.text          = CustomInput.KeyBoardUp.ToString() + " / Up Arrow";
                 Down.text        = CustomInput.KeyBoardDown.ToString() + " / Down Arrow";
                 Super.text       = CustomInput.KeyBoardSuper.ToString();
                 Accept.text      = CustomInput.KeyBoardAccept.ToString();
                 Cancel.text      = CustomInput.KeyBoardCancel.ToString();
                 Pause.text       = CustomInput.KeyBoardPause.ToString();
             }
             if (currState == ControlBinderStateMachine.State.Exit)
             {
                 Kernel.controlsExit();
             }
         }
         if (currState != ControlBinderStateMachine.State.GettingKey)
         {
             if (CustomInput.CancelFreshPressDeleteOnRead)
             {
                 Kernel.controlsExit();
             }
         }
     }
 }