Exemplo n.º 1
0
  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);
    }
  }
Exemplo n.º 2
0
 // settext
 public void setText(String text) {
   message.setText(text);
 }