Hey I'm having an issue were, when clicking on a button or when clicking a key, the key or mouse click fires like 10 responses (restricting my game to 30fps reduces the number to that, without the fps reduction its closer to 100) I'm just wondering how I can maintain that when I click or hit a button, it with only receive one response?
heres some of my input code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| if( ( mouseX >= 0 && mouseX <= play_button.getWidth()) && ( mouseY >= 90 && mouseY <= 90 + play_button.getHeight()) ){ insidePlay = true; }
if(insidePlay){ if(playScale < 1.015f) playScale += scaleStep * delta; if ( input.isMouseButtonDown(Input.MOUSE_LEFT_BUTTON) ){ if(!isLogin) { tryLogin = true; } else { sb.enterState(CodaClient.GAMEPLAYSTATE); } } }else{ if(playScale > 1.0f) playScale -= scaleStep * delta; }
|
EDIT: Sorry if there's another thread with a similar question, I searched threw a few pages but wasn't sure what this exact issue is called, so I didnt find much that helped.