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(); } }
public Buttons(Button2Press button2Press) { button = button2Press; numButtons = 2; }