Exemplo n.º 1
0
 public InvUnit(DataCards.Troops invUnitTroops, string _startingPlanetName)
 {    //Create a Troops unit and set it at a planet //Implies that this might mean its a starting unit. Generally they would need a construction.//Possibly loading from a save file in the future :)
     startingLocation           = _startingPlanetName;
     invUnitType                = Model.DataCardType.Troops;
     iuTroops                   = invUnitTroops;
     _underConstruction         = false;
     transitObj                 = new GameEngine.GalacticComponents.TravelObj();
     _remainingConstructionDays = 0;
     id = getID();
 }
Exemplo n.º 2
0
 public InvUnit(DataCards.Troops invUnitTroops, string _startingPlanetName)
 {
     //Create a Troops unit and set it at a planet //Implies that this might mean its a starting unit. Generally they would need a construction.//Possibly loading from a save file in the future :)
         startingLocation = _startingPlanetName;
         invUnitType = Model.DataCardType.Troops;
         iuTroops = invUnitTroops;
         _underConstruction = false;
         transitObj = new GameEngine.GalacticComponents.TravelObj();
         _remainingConstructionDays = 0;
         id = getID();
 }
Exemplo n.º 3
0
 public void startEntityConstruction(DataCards.Troops invUnitTroops, string _startingPlanetName)
 {
     startingLocation   = _startingPlanetName;
     invUnitType        = Model.DataCardType.Troops;
     iuTroops           = invUnitTroops;
     _underConstruction = true;
     transitObj         = new GameEngine.GalacticComponents.TravelObj();
     //_remainingConstructionDays = iuTroops.baseManufactureCost.BaseConstructionTime;
     _remainingConstructionDays = 1;
     id = getID();
 }
Exemplo n.º 4
0
        public DataCards.Troops getTroopsByName(string strTroopsName)
        {
            DataCards.Troops rtnTroops = new DataCards.Troops();

            foreach (DataCards.Troops curTroops in _troops)
            {
                if (curTroops.Name == strTroopsName)
                {
                    rtnTroops = curTroops;
                }
            }
            return(rtnTroops);
        }
Exemplo n.º 5
0
        public DataCards.Troops getTroopsByName(string strTroopsName)
        {
            DataCards.Troops rtnTroops = new DataCards.Troops();

            foreach (DataCards.Troops curTroops in _troops)
            {
                if (curTroops.Name == strTroopsName)
                {
                    rtnTroops = curTroops;
                }
            }
            return rtnTroops;
        }
Exemplo n.º 6
0
        public static List <DataCards.Troops> getTroopsFromXML()
        {
            List <DataCards.Troops> rtnTroops = new List <DataCards.Troops>();

            //Pulls from the XML
            XmlDocument xmlDoc = new XmlDocument();

            xmlDoc.Load(_DataPath + _TroopsXMLPath);

            XmlNodeList xmlTerrainNodes = xmlDoc.GetElementsByTagName("Troop");

            foreach (XmlNode curNode in xmlTerrainNodes)
            {
                DataCards.Troops curTroops = new DataCards.Troops();


                //curFacility.ID = curNode.Attributes["ID"].InnerText;
                curTroops.Name       = curNode.Attributes["Name"].InnerText;
                curTroops.HeaderText = curNode.Attributes["HeaderText"].InnerText;
                //curTroops.Type = curNode.Attributes["Type"].InnerText;


                //XmlNodeList xmlChildNodes = curNode.ChildNodes;

                //foreach (XmlNode curChildNode in xmlChildNodes)
                //{
                //    //curWidgetData.addObjImage(new System.Drawing.Bitmap(curImgNode.Attributes["src"].InnerText));



                //}


                rtnTroops.Add(curTroops);



                //_terrainObjects.Add(curWidgetData);
            }


            return(rtnTroops);
        }
Exemplo n.º 7
0
 public void startEntityConstruction(DataCards.Troops invUnitTroops, string _startingPlanetName)
 {
     startingLocation = _startingPlanetName;
         invUnitType = Model.DataCardType.Troops;
         iuTroops = invUnitTroops;
         _underConstruction = true;
         transitObj = new GameEngine.GalacticComponents.TravelObj();
         //_remainingConstructionDays = iuTroops.baseManufactureCost.BaseConstructionTime;
         _remainingConstructionDays = 1;
         id = getID();
 }
Exemplo n.º 8
0
        public static List<DataCards.Troops> getTroopsFromXML()
        {
            List<DataCards.Troops> rtnTroops = new List<DataCards.Troops>();

            //Pulls from the XML
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(_DataPath + _TroopsXMLPath);

            XmlNodeList xmlTerrainNodes = xmlDoc.GetElementsByTagName("Troop");

            foreach (XmlNode curNode in xmlTerrainNodes)
            {
                DataCards.Troops curTroops = new DataCards.Troops();

                //curFacility.ID = curNode.Attributes["ID"].InnerText;
                curTroops.Name = curNode.Attributes["Name"].InnerText;
                curTroops.HeaderText = curNode.Attributes["HeaderText"].InnerText;
                //curTroops.Type = curNode.Attributes["Type"].InnerText;

                //XmlNodeList xmlChildNodes = curNode.ChildNodes;

                //foreach (XmlNode curChildNode in xmlChildNodes)
                //{
                //    //curWidgetData.addObjImage(new System.Drawing.Bitmap(curImgNode.Attributes["src"].InnerText));

                //}

                rtnTroops.Add(curTroops);

                //_terrainObjects.Add(curWidgetData);
            }

            return rtnTroops;
        }