예제 #1
0
 public void update() {
   if (currentWeather == raining) {
     rain.update(x, y);
   } else if (currentWeather == sunny) {
     sunnyDay.update(x, y);
   } else if (currentWeather == hellsky) {
     hell.update(x, y);
   }
 }
예제 #2
0
  public void render(SpriteBatch sb) {

    if (currentWeather == raining) {
      rain.render(sb);
    } else if (currentWeather == sunny) {
      sunnyDay.render(sb);
    } else if (currentWeather == hellsky) {
      hell.render(sb);
    }
  }
예제 #3
0
 public Weather(float x, float y) {
   rain = new Rain();
   sunnyDay = new Sunny();
   hell = new Hell();
   this.x = x;
   this.y = y;
   rain.update(x, y);
   sunnyDay.update(x, y);
   hell.update(x, y);
 }