Exemple #1
0
 private void CheckButtonsPress()
 {
     if (Input.GetKey(joyInputs.button0Key))
     {
         Button0Press?.Invoke();
     }
     if (Input.GetKey(joyInputs.button1Key))
     {
         Button1Press?.Invoke();
     }
     if (Input.GetKey(joyInputs.button2Key))
     {
         Button2Press?.Invoke();
     }
     if (Input.GetKey(joyInputs.button3Key))
     {
         Button3Press?.Invoke();
     }
     if (Input.GetKey(joyInputs.button4Key))
     {
         Button4Press?.Invoke();
     }
     if (Input.GetKey(joyInputs.button5Key))
     {
         Button5Press?.Invoke();
     }
     if (Input.GetKey(joyInputs.button6Key))
     {
         Button6Press?.Invoke();
     }
     if (Input.GetKey(joyInputs.button7Key))
     {
         Button7Press?.Invoke();
     }
 }
Exemple #2
0
 public Buttons(Button3Press button3Press)
 {
     button     = button3Press;
     numButtons = 3;
 }