Package megamek.common

Examples of megamek.common.EntitySelector


     * Remove all iNarc pods from all vehicles that did not move and shoot this
     * round NOTE: this is not quite what the rules say, the player should be
     * able to choose whether or not to remove all iNarc Pods that are attached.
     */
    private void resolveVeeINarcPodRemoval() {
        Enumeration<Entity> vees = game.getSelectedEntities(new EntitySelector() {
            public boolean accept(Entity entity) {
                if ((entity instanceof Tank) && (entity.mpUsed == 0)) {
                    return true;
                }
                return false;
View Full Code Here


        setStatusBarText(Messages.getString("MovementDisplay.AllPlayersUnload")); //$NON-NLS-1$

        // Collect the stranded entities into the vector.
        // TODO : get a better interface to "game" and "turn"
        Enumeration<Entity> entities = client
                .getSelectedEntities(new EntitySelector() {
                    private final IGame game = client.game;
                    private final GameTurn turn = client.game.getTurn();
                    private final int ownerId = client.getLocalPlayer().getId();

                    public boolean accept(Entity acc) {
View Full Code Here

        // Let the player know what's going on.
        setStatusBarText(Messages.getString("MovementDisplay.AllPlayersUnload")); //$NON-NLS-1$

        // Collect the stranded entities into the vector.
        // TODO : get a better interface to "game" and "turn"
        Enumeration<Entity> entities = client.getSelectedEntities(new EntitySelector() {
            private final IGame game = client.game;
            private final GameTurn turn = client.game.getTurn();
            private final int ownerId = client.getLocalPlayer().getId();

            public boolean accept(Entity entity) {
View Full Code Here

        final AmmoType atype = ammo == null ? null : (AmmoType) ammo.getType();
        // Are there any valid spotters?
        if ((null != spottersBefore) && !isFlak) {
            // fetch possible spotters now
            Enumeration<Entity> spottersAfter = game
                    .getSelectedEntities(new EntitySelector() {
                        public int player = playerId;

                        public Targetable targ = target;

                        public boolean accept(Entity entity) {
View Full Code Here

                            direction = IOffBoardDirections.WEST;
                            break;
                        default:
                    }
                    Enumeration<Entity> thisPlayerArtyUnits = client.game
                            .getSelectedEntities(new EntitySelector() {
                                public boolean accept(Entity entity) {
                                    if (entity.getOwnerId() == client
                                            .getLocalPlayer().getId()) {
                                        return true;
                                    }
View Full Code Here

                        case 18:
                            direction = IOffBoardDirections.WEST;
                            break;
                    }
                    Enumeration<Entity> thisPlayerArtyUnits = client.game
                            .getSelectedEntities(new EntitySelector() {
                                public boolean accept(Entity entity) {
                                    if (entity.getOwnerId() == client
                                            .getLocalPlayer().getId()) {
                                        return true;
                                    }
View Full Code Here

            labCallsign.setText(callsign.toString());

            // Get the Protomechs of this entity's player
            // that *aren't* in the entity's unit.
            Enumeration<Entity> otherUnitEntities = client.game
                    .getSelectedEntities(new EntitySelector() {
                        private final int ownerId = CustomMechDialog.this.entity
                                .getOwnerId();
                        private final char unitNumber = CustomMechDialog.this.entity
                                .getUnitNumber();

View Full Code Here

            tempPanel.add(labCallsign, GBC.eol().anchor(GridBagConstraints.CENTER));

            // Get the Protomechs of this entity's player
            // that *aren't* in the entity's unit.
            Enumeration<Entity> otherUnitEntities = client.game
                    .getSelectedEntities(new EntitySelector() {
                        private final int ownerId = CustomMechDialog.this.entity
                                .getOwnerId();

                        private final char unitNumber = CustomMechDialog.this.entity
                                .getUnitNumber();
View Full Code Here

TOP

Related Classes of megamek.common.EntitySelector

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.