Exemplo n.º 1
0
  public void setState(int state) {
    if (gamestate != null) gamestate.dispose();

    if (state == LOGIN) {
      gamestate = new LoginState(this);
    }
    if (state == MAIN) {
      gamestate = new MainMenu(this);
    }
    if (state == MATCH) {
      gamestate = new Match(this);
    }
    if (state == CHANGETEAM) {
      gamestate = new ChangeTeamState(this);
    }
    if (state == FORMATION) {
      gamestate = new FormationState(this);
    }
  }
Exemplo n.º 2
0
 public void draw() {
   gamestate.draw();
 }
Exemplo n.º 3
0
 public void update(float dt) {
   gamestate.update(dt);
 }