public void onMouseMove(Location point) { if (gameOn) { theFish.moveTo(point.getX() - theFish.getWidth() / 2, point.getY()); lastMouse = point; currentScore = theFish.getScore(); score.setText("Score: " + currentScore); score.moveTo((canvas.getWidth() - score.getWidth()) / 2, 50); } }
// settext public void setText(String text) { message.setText(text); }