MouseX() MouseY() or store inside variable ?
Monkey Programming Forums/Monkey Programming/MouseX() MouseY() or store inside variable ?
| ||
| Is it a good idea to store the MouseX() and MouseY() inside a Float ? And use that every loop ? Something like this. - main loop update(){ myMouseX = MouseX() myMouseY = MouseY() - other classes uses now myMouseX and myMouseY } Or are there some small Mouse xy updates inside the same loop, so I have to use MouseX() and MouseY() Then a bonus question ;) ------------------------------------------------ Is it always slow when I do something like this - main loop update(){ myMouseX = MouseX() myMouseY = MouseY() } render(){ draw(rect,myMouseX,myMouseY) } When you move the mouse over the screen, the rect is slow moving with a delay (fps(30) and fps(60)) using html5 ------------------------------------------------ Thanks, |







