Package RoFParser.AType

Examples of RoFParser.AType.GameObjectInvolved


       
       
        Iterator<GameObjectInvolved> it = gois.iterator();
        while (it.hasNext())
        {
            GameObjectInvolved goi = it.next();
            if (goi.isCrew())
            {
                String profileID = null;
                int isAI = 1;
                int pilotID; //aka driver/pilot (main controller) of a vehicle???
                String vType = goi.getType();
               
                pit = players.iterator();
                while (pit.hasNext())
                {
                    PlayerPlane player = pit.next();
                    if (player.getPlayerID() == goi.getID())
                    {
                        //current goi crew IS a player!
                        profileID = player.getIds();
                        isAI = 0;
                        vType = hmpp.get(profileID).getName();
                       
                    }
                }
               
                //get pilot ID
                GameObjectInvolved parentGOI = hmgoi.get(goi.getParentID());
                if (parentGOI.getParentID() == -1)
                {
                    pilotID = goi.getID();
                }
                else
                {
                    //initialise as 'grandparent'
                    GameObjectInvolved tmpParentGOI = hmgoi.get(parentGOI.getParentID());
                   
                    while (tmpParentGOI.getParentID() != -1)
                    {
                        tmpParentGOI = hmgoi.get(tmpParentGOI.getParentID());
                    }
                    pilotID = tmpParentGOI.getID();
                }
               
                //add crew to dbcrew
                DBCrew tmpCrew = new DBCrew(goi.getID(), mission.getMissionID(), goi.getParentID(),
                                            pilotID, profileID, vType, goi.getTick(), goi.getCountry(), isAI);
View Full Code Here


        ArrayList<GameObjectInvolved> gois = mission.getGameObjects();
       
        Iterator<GameObjectInvolved> itGOI = gois.iterator();
        while (itGOI.hasNext())
        {
            GameObjectInvolved goi = itGOI.next();
            gameObjects.add(new DBGameObject(goi.getID(), mission.getMissionID(),
                                             goi.getParentID(), goi.getTick(),
                                             goi.getType(), goi.getDescriptiveType(),
                                             goi.getName()));
        }
       
        return gameObjects;
    }
View Full Code Here

TOP

Related Classes of RoFParser.AType.GameObjectInvolved

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.