public void ReleaseButton(Button btn) { switch (btn) { case Button.A: A_Button.Release(); break; case Button.B: B_Button.Release(); break; case Button.START: Start_Button.Release(); break; case Button.C_UP: C_UP.Release(); break; case Button.C_RIGHT: C_RIGHT.Release(); break; case Button.C_DOWN: C_DOWN.Release(); break; case Button.C_LEFT: C_LEFT.Release(); break; } }
private void FixedUpdate() { if (!_isPushing) { return; } if (!Input.GetMouseButton(0) || Input.GetMouseButtonUp(0)) { _isPushing = false; _button.Release(); return; } }