Package ch.sahits.game.event

Examples of ch.sahits.game.event.ViewChangeRequestEvent


            // Initialize the player
            new NewGameEvent(ENewGame.SINGELPLAYER).notify(player);
            // Initialize the game/server
            new NewGameEvent(ENewGame.SINGELPLAYER).notify(game);
            // Request the view change
            new ViewChangeRequestEvent(ChangeRequest.ALL).notify(EViewChangeEvent.START_GAME);
          } catch (IOException e) { // property file for city creation not available
            e.printStackTrace();
          }
        } // end if valid input
       
View Full Code Here


class SinglePlayerEventListener implements IEventListener {

  @Override
  public void gameUpdate(Event e, Object eventNotice) {
    if (e instanceof ViewChangeRequestEvent){
      ViewChangeRequestEvent event = (ViewChangeRequestEvent) e;
      if (event.getAdressee().equals(ChangeRequest.ALL)){
        if (eventNotice.equals(EViewChangeEvent.START_GAME)){
          // notify the human player of the gameview change
          new ViewChangeEvent(IMainGameView.class).notify(EViewChangeEvent.START_GAME);
        }
      }
View Full Code Here

            // Initialize the player
            new NewGameEvent(ENewGame.SINGELPLAYER).notify(player);
            // Initialize the game/server
            new NewGameEvent(ENewGame.SINGELPLAYER).notify(game);
            // Request the view change
            new ViewChangeRequestEvent(ChangeRequest.ALL).notify(EViewChangeEvent.START_GAME);
          } catch (IOException e) { // property file for city creation not available
            e.printStackTrace();
          }
        } // end if valid input
       
View Full Code Here

TOP

Related Classes of ch.sahits.game.event.ViewChangeRequestEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.