Package megamek.client

Examples of megamek.client.Client


        }
        else if (ae.getSource() == m_bPick) {
            if(squadron.size() <= 0) {
                return;
            }
            Client c = null;
            if (m_chPlayer.getSelectedIndex() > 0) {
                String name = (String)m_chPlayer.getSelectedItem();
                c = m_clientgui.getBots().get(name);
            }
            if (c == null) {
                c = m_client;
            }
            //compile the fighter squadron
            FighterSquadron fs = new FighterSquadron();
            //create a new fighter squadron entity
            //FighterSquadron chosen = fs;
            //fs.compileSquadron();
            autoSetSkills(fs);
            fs.setOwner(c.getLocalPlayer());
            c.sendAddEntity(fs);
            //clear the current squadron
            squadron.removeAllElements();
            //fs.fighters.removeAllElements();
            listFightersSelected.removeAll();
            setVisible(false);
View Full Code Here


                            error.toString(),
                            Messages.getString("MegaMek.HostGameAllert.title"), JOptionPane.ERROR_MESSAGE); //$NON-NLS-1$
            return;
        }
        // initialize client
        client = new Client(hd.playerName, "localhost", hd.port); //$NON-NLS-1$
        ClientGUI gui = new ClientGUI(client);
        gui.initialize();
        if (!client.connect()) {
            StringBuffer error = new StringBuffer();
            error.append("Error: could not connect to server at localhost")
View Full Code Here

                            frame,
                            Messages.getString("MegaMek.LoadGameAlert.message"), Messages.getString("MegaMek.LoadGameAlert.title"), JOptionPane.ERROR_MESSAGE); //$NON-NLS-1$ //$NON-NLS-2$
            server = null;
            return;
        }
        client = new Client(hd.playerName, "localhost", hd.port); //$NON-NLS-1$
        ClientGUI gui = new ClientGUI(client);
        gui.initialize();
        if (!client.connect()) {
            StringBuffer error = new StringBuffer();
            error.append("Error: could not connect to server at localhost")
View Full Code Here

        // apply any scenario damage
        sl.applyDamage(server);
        ClientGUI gui = null;
        if (!"".equals(sd.localName)) { //$NON-NLS-1$
            // initialize game
            client = new Client(hd.playerName, "localhost", hd.port); //$NON-NLS-1$
            gui = new ClientGUI(client);
            gui.initialize();
            if (!client.connect()) {
                StringBuffer error = new StringBuffer();
                error.append("Error: could not connect to server at localhost")
View Full Code Here

                            Messages.getString("MegaMek.ConnectAllert.message"), Messages.getString("MegaMek.ConnectAllert.title"), JOptionPane.ERROR_MESSAGE); //$NON-NLS-1$ //$NON-NLS-2$
            return;
        }

        // initialize game
        client = new Client(cd.playerName, cd.serverAddr, cd.port);
        ClientGUI gui = new ClientGUI(client);
        gui.initialize();
        if (!client.connect()) {
            StringBuffer error = new StringBuffer();
            error.append("Error: could not connect to server at ").append(
View Full Code Here

        }
        else if (ae.getSource() == m_bPick) {
            if(squadron.size() <= 0) {
                return;
            }
            Client c = null;
            if (m_chPlayer.getSelectedIndex() > 0) {
                String name = m_chPlayer.getSelectedItem();
                c = m_clientgui.getBots().get(name);
            }
            if (c == null) {
                c = m_client;
            }
            //compile the fighter squadron
            FighterSquadron fs = new FighterSquadron();
            autoSetSkills(fs);
            fs.setOwner(c.getLocalPlayer());
            fs.updateWeaponGroups();
            c.sendAddEntity(fs);
            /*
            for(Entity e : squadron) {
                autoSetSkills(e);
                e.setOwner(c.getLocalPlayer());
                e.setTransportId(fs.getId());
View Full Code Here

                    frame,
                    Messages.getString("MegaMek.HostGameAllert.title"), error.toString()).setVisible(true); //$NON-NLS-1$
            return;
        }
        // initialize client
        client = new Client(hd.name, "localhost", hd.port); //$NON-NLS-1$
        ClientGUI gui = new ClientGUI(client);
        gui.initialize();

        if (!client.connect()) {
            StringBuffer error = new StringBuffer();
View Full Code Here

                    Messages.getString("MegaMek.LoadGameAlert.title"), Messages.getString("MegaMek.LoadGameAlert.message")).setVisible(true); //$NON-NLS-1$ //$NON-NLS-2$
            server.die();
            server = null;
            return;
        }
        client = new Client(hd.name, "localhost", hd.port); //$NON-NLS-1$
        ClientGUI gui = new ClientGUI(client);
        gui.initialize();

        if (!client.connect()) {
            StringBuffer error = new StringBuffer();
View Full Code Here

        // apply any scenario damage
        sl.applyDamage(server);
        ClientGUI gui = null;
        if (sd.localName != "") { //$NON-NLS-1$
            // initialize game
            client = new Client(hd.name, "localhost", hd.port); //$NON-NLS-1$
            gui = new ClientGUI(client);
            gui.initialize();

            if (!client.connect()) {
                StringBuffer error = new StringBuffer();
View Full Code Here

                    Messages.getString("MegaMek.ConnectAllert.title"), Messages.getString("MegaMek.ConnectAllert.message")).setVisible(true); //$NON-NLS-1$ //$NON-NLS-2$
            return;
        }

        // initialize game
        client = new Client(cd.name, cd.serverAddr, cd.port);
        ClientGUI gui = new ClientGUI(client);
        gui.initialize();
        if (!client.connect()) {
            StringBuffer error = new StringBuffer();
            error.append("Error: could not connect to server at ").append(
View Full Code Here

TOP

Related Classes of megamek.client.Client

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.