Package megamek.common.event

Examples of megamek.common.event.GameListener


     * @param event the game event.
     */
    public void processGameEvent(GameEvent event) {
        for (Enumeration<GameListener> e = gameListeners.elements(); e
                .hasMoreElements();) {
            GameListener l = e.nextElement();
            switch (event.getType()) {
                case GameEvent.GAME_PLAYER_CONNECTED:
                    l.gamePlayerConnected((GamePlayerConnectedEvent) event);
                    break;
                case GameEvent.GAME_PLAYER_DISCONNECTED:
                    l.gamePlayerDisconnected((GamePlayerDisconnectedEvent) event);
                    break;
                case GameEvent.GAME_PLAYER_CHANGE:
                    l.gamePlayerChange((GamePlayerChangeEvent) event);
                    break;
                case GameEvent.GAME_PLAYER_CHAT:
                    l.gamePlayerChat((GamePlayerChatEvent) event);
                    break;
                case GameEvent.GAME_PHASE_CHANGE:
                    l.gamePhaseChange((GamePhaseChangeEvent) event);
                    break;
                case GameEvent.GAME_TURN_CHANGE:
                    l.gameTurnChange((GameTurnChangeEvent) event);
                    break;
                case GameEvent.GAME_REPORT:
                    l.gameReport((GameReportEvent) event);
                    break;
                case GameEvent.GAME_END:
                    l.gameEnd((GameEndEvent) event);
                    break;
                case GameEvent.GAME_BOARD_NEW:
                    l.gameBoardNew((GameBoardNewEvent) event);
                    break;
                case GameEvent.GAME_BOARD_CHANGE:
                    l.gameBoardChanged((GameBoardChangeEvent) event);
                    break;
                case GameEvent.GAME_SETTINGS_CHANGE:
                    l.gameSettingsChange((GameSettingsChangeEvent) event);
                    break;
                case GameEvent.GAME_MAP_QUERY:
                    l.gameMapQuery((GameMapQueryEvent) event);
                    break;
                case GameEvent.GAME_ENTITY_NEW:
                    l.gameEntityNew((GameEntityNewEvent) event);
                    break;
                case GameEvent.GAME_ENTITY_REMOVE:
                    l.gameEntityRemove((GameEntityRemoveEvent) event);
                    break;
                case GameEvent.GAME_ENTITY_NEW_OFFBOARD:
                    l.gameEntityNewOffboard((GameEntityNewOffboardEvent) event);
                    break;
                case GameEvent.GAME_ENTITY_CHANGE:
                    l.gameEntityChange((GameEntityChangeEvent) event);
                    break;
                case GameEvent.GAME_NEW_ACTION:
                    l.gameNewAction((GameNewActionEvent) event);
                    break;
            }
        }
    }
View Full Code Here

TOP

Related Classes of megamek.common.event.GameListener

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.