Example #1
0
  private void checkHit() {
    AllMinionState m = (AllMinionState) getOneIntersectingObject(AllMinionState.class);
    SWorld sWorld = (SWorld) getWorld();

    if (m != null) {
      oneUpSound.play();
      CollectPoints cp = new CollectPoints();
      cp.collectLives(1);
      if (getWorld() instanceof MyWorld) {
        MyWorld myWorld = (MyWorld) sWorld;
        myWorld.updatePointScoreboard();
      }
      getWorld().removeObject(this);
    }
  }