Пример #1
0
        public static GameEngine.StartingGameUnits getStartingSettingsFromXML(string strFactionName, Model.StaticDataCards staticDataCards)
        {
            GameEngine.StartingGameUnits rtnStartingGameUnits = new GameEngine.StartingGameUnits();


            XmlDocument xmlDoc = new XmlDocument();

            xmlDoc.Load(_DataPath + _StartingSettingsXMLPath);

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

            foreach (XmlNode curNode in xmlTerrainNodes)
            {
                //Get this factions starting units
                if (curNode.Attributes["FactionName"].InnerText == strFactionName)
                {
                    XmlNodeList xmlChildNodes = curNode.ChildNodes;

                    foreach (XmlNode curChildNode in xmlChildNodes)
                    {
                        //Consider a way to implement this...
                        //if (curChildNode.Attributes["Type"].InnerText == Model.DataCardType.Planet.ToString())
                        //{
                        //    GameEngine.PlayerInvObjs.InvUnit curInvUnit = new GameEngine.PlayerInvObjs.InvUnit(staticDataCards.getShipByName(curChildNode.Attributes["UnitName"].InnerText), curChildNode.Attributes["PlanetName"].InnerText);

                        //    rtnStartingGameUnits.startingUnits.Add(curInvUnit);
                        //}

                        if (curChildNode.Attributes["Type"].InnerText == "Resources")
                        {
                            rtnStartingGameUnits.startingResources = Model.Utilities.getIntOrN(curChildNode.Attributes["StartingAmount"].InnerText, -1);
                        }

                        if (curChildNode.Attributes["Type"].InnerText == Model.DataCardType.Facility.ToString())
                        {
                            GameEngine.PlayerInvObjs.InvUnit curInvUnit = new GameEngine.PlayerInvObjs.InvUnit(staticDataCards.getFacilityByName(curChildNode.Attributes["UnitName"].InnerText), curChildNode.Attributes["PlanetName"].InnerText);

                            rtnStartingGameUnits.startingUnits.Add(curInvUnit);
                        }

                        else if (curChildNode.Attributes["Type"].InnerText == Model.DataCardType.Ship.ToString())
                        {
                            GameEngine.PlayerInvObjs.InvUnit curInvUnit = new GameEngine.PlayerInvObjs.InvUnit(staticDataCards.getShipByName(curChildNode.Attributes["UnitName"].InnerText), curChildNode.Attributes["PlanetName"].InnerText);

                            rtnStartingGameUnits.startingUnits.Add(curInvUnit);
                        }

                        else if (curChildNode.Attributes["Type"].InnerText == Model.DataCardType.Troops.ToString())
                        {
                            GameEngine.PlayerInvObjs.InvUnit curInvUnit = new GameEngine.PlayerInvObjs.InvUnit(staticDataCards.getTroopsByName(curChildNode.Attributes["UnitName"].InnerText), curChildNode.Attributes["PlanetName"].InnerText);

                            rtnStartingGameUnits.startingUnits.Add(curInvUnit);
                        }
                    }
                }
            }


            return(rtnStartingGameUnits);
        }
Пример #2
0
        public GameEngine.PlayerInvObjs.InvUnit getInvUnitByID(int id, Model.DataCardType dataCardType)
        {
            GameEngine.PlayerInvObjs.InvUnit rtnInvUnit = new GameEngine.PlayerInvObjs.InvUnit();

            if (dataCardType == GalacticConquest.Model.DataCardType.Facility)
            {
            }
            else if (dataCardType == GalacticConquest.Model.DataCardType.Ship)
            {
                List <DataCards.Planet> allPlanets = this.getAllPlanetsList();

                foreach (DataCards.Planet curPlanet in allPlanets)
                {
                    foreach (GameEngine.PlayerInvObjs.InvUnit curInv in curPlanet.Orbit.StarshipFleetsInOrbit)
                    {
                        if (curInv.id == id)
                        {
                            rtnInvUnit = curInv;
                            break;
                        }
                    }
                }
            }
            else if (dataCardType == GalacticConquest.Model.DataCardType.Troops)
            {
            }
            return(rtnInvUnit);
        }
Пример #3
0
        public GameEngine.PlayerInvObjs.InvUnit getInvUnitByID(int id, Model.DataCardType dataCardType)
        {
            GameEngine.PlayerInvObjs.InvUnit rtnInvUnit = new GameEngine.PlayerInvObjs.InvUnit();

            if (dataCardType == GalacticConquest.Model.DataCardType.Facility)
            {
            }
            else if (dataCardType == GalacticConquest.Model.DataCardType.Ship)
            {
                List<DataCards.Planet> allPlanets = this.getAllPlanetsList();

                foreach (DataCards.Planet curPlanet in allPlanets)
                {
                    foreach (GameEngine.PlayerInvObjs.InvUnit curInv in curPlanet.Orbit.StarshipFleetsInOrbit)
                    {
                        if (curInv.id == id)
                        {
                            rtnInvUnit = curInv;
                            break;
                        }
                    }
                }

            }
            else if (dataCardType == GalacticConquest.Model.DataCardType.Troops)
            {
            }
            return rtnInvUnit;
        }
Пример #4
0
        //Methods

        public void removeShipFromOrbitByID(int ID)
        {
            for (int i = 0; i < ShipsInFleet.Count; i++)
            {
                GameEngine.PlayerInvObjs.InvUnit curIU = ShipsInFleet[i];

                if (curIU.id == ID)
                {
                    ShipsInFleet.RemoveAt(i);
                }
            }
        }
Пример #5
0
        public static GameEngine.StartingGameUnits getStartingSettingsFromXML(string strFactionName, Model.StaticDataCards staticDataCards)
        {
            GameEngine.StartingGameUnits rtnStartingGameUnits = new GameEngine.StartingGameUnits();

            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(_DataPath + _StartingSettingsXMLPath);

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

            foreach (XmlNode curNode in xmlTerrainNodes)
            {
                //Get this factions starting units
                if (curNode.Attributes["FactionName"].InnerText == strFactionName)
                {
                    XmlNodeList xmlChildNodes = curNode.ChildNodes;

                    foreach (XmlNode curChildNode in xmlChildNodes)
                    {
                        //Consider a way to implement this...
                        //if (curChildNode.Attributes["Type"].InnerText == Model.DataCardType.Planet.ToString())
                        //{
                        //    GameEngine.PlayerInvObjs.InvUnit curInvUnit = new GameEngine.PlayerInvObjs.InvUnit(staticDataCards.getShipByName(curChildNode.Attributes["UnitName"].InnerText), curChildNode.Attributes["PlanetName"].InnerText);

                        //    rtnStartingGameUnits.startingUnits.Add(curInvUnit);
                        //}

                        if (curChildNode.Attributes["Type"].InnerText == "Resources")
                            rtnStartingGameUnits.startingResources = Model.Utilities.getIntOrN(curChildNode.Attributes["StartingAmount"].InnerText, -1);

                        if (curChildNode.Attributes["Type"].InnerText == Model.DataCardType.Facility.ToString())
                        {
                            GameEngine.PlayerInvObjs.InvUnit curInvUnit = new GameEngine.PlayerInvObjs.InvUnit(staticDataCards.getFacilityByName(curChildNode.Attributes["UnitName"].InnerText), curChildNode.Attributes["PlanetName"].InnerText);

                            rtnStartingGameUnits.startingUnits.Add(curInvUnit);
                        }

                        else if (curChildNode.Attributes["Type"].InnerText == Model.DataCardType.Ship.ToString())
                        {
                            GameEngine.PlayerInvObjs.InvUnit curInvUnit = new GameEngine.PlayerInvObjs.InvUnit(staticDataCards.getShipByName(curChildNode.Attributes["UnitName"].InnerText), curChildNode.Attributes["PlanetName"].InnerText);

                            rtnStartingGameUnits.startingUnits.Add(curInvUnit);
                        }

                        else if (curChildNode.Attributes["Type"].InnerText == Model.DataCardType.Troops.ToString())
                        {
                            GameEngine.PlayerInvObjs.InvUnit curInvUnit = new GameEngine.PlayerInvObjs.InvUnit(staticDataCards.getTroopsByName(curChildNode.Attributes["UnitName"].InnerText), curChildNode.Attributes["PlanetName"].InnerText);

                            rtnStartingGameUnits.startingUnits.Add(curInvUnit);
                        }

                    }

                }

            }

            return rtnStartingGameUnits;
        }
Пример #6
0
        ////////////////////////////////////////////
        //Check Mouse Clicks
        public void checkGameRunningMouseClick(GameUpdateClassComponents curGameUpdateComponents)
        {
            if (this._gameIsRunning)
            {
                ///////////////////////////////////////
                //Check Orbit Planet Menus
                //////////////////////////////////////

                //Check Orbit Menu
                if (!this.LeftPlanetOrbitMenu._isNull && this.LeftPlanetOrbitMenu._isEnabled)
                {
                    bool blnExit = false;

                    //foreach(Controls.FancyDropDownBoxControl curDDB in this.LeftPlanetOrbitMenu.menuDropDownBoxControls)
                    //{
                        for (int i = 0; i < this.LeftPlanetOrbitMenu.menuDropDownBoxControls.Count; i++)
                        {

                            if (LeftPlanetOrbitMenu.menuDropDownBoxControls[i]._isEnabled)
                            {
                                if (LeftPlanetOrbitMenu.menuDropDownBoxControls[i].dropDownBoxArrow.mouseClicked(curGameUpdateComponents))
                                {
                                    if (LeftPlanetOrbitMenu.menuDropDownBoxControls[i].dropDownCollapsed)
                                        LeftPlanetOrbitMenu.menuDropDownBoxControls[i].dropDownCollapsed = false;
                                    else
                                        LeftPlanetOrbitMenu.menuDropDownBoxControls[i].dropDownCollapsed = true;
                                }

                                if (!LeftPlanetOrbitMenu.menuDropDownBoxControls[i].dropDownCollapsed)
                                {
                                    LeftPlanetOrbitMenu.menuDropDownBoxControls[i].mouseClicked(curGameUpdateComponents);
                                }
                            }
                        }
                    //}

                        bool blnOrbitLeftClose = false;
                        int menuInc = 0;
                    //Run through each Button
                    foreach (Controls.FancyButtonControl curButton in this.LeftPlanetOrbitMenu.menuButtons)
                    {
                        if (!curButton._isNull)
                        {
                            if (curButton.mouseClicked(curGameUpdateComponents))
                            {
                                if (curButton.ID == "btnExitOrbitMenu")
                                {//Clicked Exit Galaxy
                                    blnOrbitLeftClose = true;
                                }

                                if (curButton.ID.Length > "btnSendShip".Length)
                                {
                                    if (curButton.ID.Substring(0, "btnSendShip".Length) == "btnSendShip")
                                    {
                                        int invUnitID = Convert.ToInt32(curButton.ID.Replace("btnSendShip", ""));

                                        string originalPlanetName = LeftPlanetOrbitMenu.strPlanetName;

                                        GameEngine.PlayerInvObjs.InvUnit myInv = curGameUniverse.getInvUnitByID(invUnitID, Model.DataCardType.Ship);

                                        string desitiantionPlanetName = LeftPlanetOrbitMenu.getDestinationPlanetNameByID(invUnitID);

                                        DataCards.Planet oriPlnt = curGameUniverse.getPlanetByName(originalPlanetName);

                                        DataCards.Planet destPlnt = curGameUniverse.getPlanetByName(desitiantionPlanetName);

                                        oriPlnt.Orbit.removeShipFromOrbitByID(myInv.id);

                                        //Takes 5 days to get anywhere!
                                        myInv.transitObj.setTravelTime(5);

                                        destPlnt.Orbit.StarshipFleetsInOrbit.Add(myInv);

                                        LeftPlanetOrbitMenu.menuButtons.RemoveAt(menuInc);

                                        blnOrbitLeftClose = true;

                                        break;
                                        //myInv.
                                    }
                                }
                                //if (curButton.ID == "btnExitPlanetCmdMenu")
                                //{//Clicked Exit Planet Command
                                //    exitPlntCmdMenu = true;
                                //}

                                //if (curButton.ID == "btnContinue")
                                //{//Clicked Exit Faction form
                                //    _continueClicked = true;
                                //}

                            }
                        }
                        menuInc++;
                    }

                    if (blnOrbitLeftClose)
                    {
                        this.LeftPlanetOrbitMenu = new Controls.PlanetOrbitControl();
                        this.LeftPlanetMenu.Enable();
                        this.RightPlanetMenu.Enable();
                    }
                }

                ///////////////////////////////////////
                //Check Galaxy Planet Menus
                //////////////////////////////////////
                //Check Left Menu
                if (!this.LeftPlanetMenu._isNull && this.LeftPlanetMenu._isEnabled)
                {
                    bool exitLeftGPMenu = false;
                    bool exitRightGPMenu = false;

                    //Run through each Button
                    foreach (Controls.FancyButtonControl curButton in this.LeftPlanetMenu.menuButtons)
                    {
                        if (!curButton._isNull)
                        {
                            if (curButton.mouseClicked(curGameUpdateComponents))
                            {
                                if (curButton.ID == "btnExitGalaxyMenu")
                                {//Clicked Exit Galaxy
                                    exitLeftGPMenu = true;
                                }

                                //if (curButton.ID == "btnContinue")
                                //{//Clicked Exit Faction form
                                //    _continueClicked = true;
                                //}

                            }
                        }
                    }

                    float startingPlanetY = this.LeftPlanetMenu.vectorPos.Y + 50;

                    float infoButtonX = Model.StaticValues.xPaddingForInfoBuutton + this.LeftPlanetMenu.vectorPos.X;
                    float commandButtonX = Model.StaticValues.xPaddingForCommandButton + this.LeftPlanetMenu.vectorPos.X;
                    float orbitButtonX = Model.StaticValues.xPaddingForOrbitButton + this.LeftPlanetMenu.vectorPos.X;

                    foreach (DataCards.Planet curPlanet in this.LeftPlanetMenu.menuPlanetControls)
                    {
                        //Check for Info Button
                        if (curGameUpdateComponents._curMouseState.X > infoButtonX && curGameUpdateComponents._curMouseState.X < (infoButtonX + 30))
                        {
                            if (curGameUpdateComponents._curMouseState.Y > startingPlanetY && curGameUpdateComponents._curMouseState.Y < (startingPlanetY + 30))
                            {
                                CreatePlanetInfoMenu(curGameUpdateComponents, curPlanet);
                            }
                        }

                        //Check for Command Button
                        if (curGameUpdateComponents._curMouseState.X > commandButtonX && curGameUpdateComponents._curMouseState.X < (commandButtonX + 30))
                        {
                            if (curGameUpdateComponents._curMouseState.Y > startingPlanetY && curGameUpdateComponents._curMouseState.Y < (startingPlanetY + 30))
                            {
                                CreatePlanetCommandMenu(curGameUpdateComponents, curPlanet);
                            }
                        }

                        //Check for Orbit Button
                        if (curGameUpdateComponents._curMouseState.X > orbitButtonX && curGameUpdateComponents._curMouseState.X < (orbitButtonX + 30))
                        {
                            if (curGameUpdateComponents._curMouseState.Y > startingPlanetY && curGameUpdateComponents._curMouseState.Y < (startingPlanetY + 30))
                            {
                                //CreatePlanetCommandMenu(curGameUpdateComponents, curPlanet);
                                CreateOrbitCommandMenu(curGameUpdateComponents, curPlanet);
                            }
                        }

                        startingPlanetY += 60;

                    }

                    if (exitLeftGPMenu)
                    {
                        this.LeftPlanetMenu = new Controls.PlanetsInGalaxyMenu();
                    }

                    if (exitRightGPMenu)
                    {
                        this.RightPlanetMenu = new Controls.PlanetsInGalaxyMenu();
                    }

                }

                //Check Info Menu
                if (!this.InfoMenu._isNull && this.InfoMenu._isEnabled)
                {
                    bool exitInfoMenu = false;

                    //Run through each Button
                    foreach (Controls.FancyButtonControl curButton in this.InfoMenu.menuButtons)
                    {
                        if (!curButton._isNull)
                        {
                            if (curButton.mouseClicked(curGameUpdateComponents))
                            {
                                if (curButton.ID == "btnExitInfoMenu")
                                {//Clicked Exit Galaxy
                                    exitInfoMenu = true;
                                }

                                //if (curButton.ID == "btnExitPlanetCmdMenu")
                                //{//Clicked Exit Planet Command
                                //    exitPlntCmdMenu = true;
                                //}

                                //if (curButton.ID == "btnContinue")
                                //{//Clicked Exit Faction form
                                //    _continueClicked = true;
                                //}

                            }
                        }
                    }

                    if (exitInfoMenu)
                    {
                        this.InfoMenu = new Controls.GameInformationMenu();

                        this.LeftPlanetMenu.Enable();
                        this.RightPlanetMenu.Enable();
                    }

                    //if (exitPlntCmdMenu)
                    //{
                    //    this.PlanetCommandMenu = new Controls.PlanetCommandControl();

                    //    this.LeftPlanetMenu.Enable();
                    //    this.RightPlanetMenu.Enable();
                    //}

                }

                //Check Planet Control Menu
                if (!this.PlanetCommandMenu._isNull && this.PlanetCommandMenu._isEnabled)
                {

                    bool exitPlntCmdMenu = false;

                    //Run through each Button
                    foreach (Controls.FancyButtonControl curButton in this.PlanetCommandMenu.menuButtons)
                    {
                        if (!curButton._isNull)
                        {
                            if (curButton.mouseClicked(curGameUpdateComponents))
                            {
                            //    if (curButton.ID == "btnExitInfoMenu")
                            //    {//Clicked Exit Galaxy
                            //        exitInfoMenu = true;
                            //    }

                                if (curButton.ID == "btnExitPlanetCmdMenu")
                                {//Clicked Exit Planet Command
                                    exitPlntCmdMenu = true;
                                }

                                //if (curButton.ID == "btnContinue")
                                //{//Clicked Exit Faction form
                                //    _continueClicked = true;
                                //}

                            }
                        }
                    }

                    foreach (Controls.TabPanel.TabPanel curTP in PlanetCommandMenu.tabControl.tabPanels)
                    {
                        Controls.PanelControl curPnl = curTP.panel;

                        //Prolly dont need a loop here but whatevs///

                        if (curTP.selected)
                        {
                            foreach (Controls.FancyButtonControl curBtn in curPnl.menuButtons)
                            {
                                if (curBtn.mouseClicked(curGameUpdateComponents))
                                {
                                    if (curBtn.ID == "btnFacilityMFR")
                                    {
                                        buildConstructionMenu(curGameUpdateComponents, curBtn.ID);
                                    }

                                    if (curBtn.ID == "btnShipMFR")
                                    {
                                        buildConstructionMenu(curGameUpdateComponents, curBtn.ID);
                                        //buildShipMenu(curGameUpdateComponents, curBtn.ID);
                                    }

                                    if (curBtn.ID == "btnTroopsMFR")
                                    {
                                        buildConstructionMenu(curGameUpdateComponents, curBtn.ID);
                                        //buildShipMenu(curGameUpdateComponents, curBtn.ID);
                                    }

                                    if (curBtn.ID == "btnTroops")
                                    {
                                        loadAsManyTroopsOnShipsAsPossible(PlanetCommandMenu.SelectedPlanetName);
                                    }
                                }
                            }
                        }

                    }

                    PlanetCommandMenu.CheckMouseClick(curGameUpdateComponents);

                    if (exitPlntCmdMenu)
                    {
                        this.PlanetCommandMenu = new Controls.PlanetCommandControl();

                        this.LeftPlanetMenu.Enable();
                        this.RightPlanetMenu.Enable();
                    }

                }

                //Check Construction Menu
                if (!ConstructionMenu._isNull)
                {

                    if (ConstructionMenu.destinationDropDown._isEnabled)
                    {
                        //Collapse or close menu if arrow clicked
                        if (ConstructionMenu.destinationDropDown.dropDownBoxArrow.mouseClicked(curGameUpdateComponents))
                        {
                            if (ConstructionMenu.destinationDropDown.dropDownCollapsed)
                                ConstructionMenu.destinationDropDown.dropDownCollapsed = false;
                            else
                                ConstructionMenu.destinationDropDown.dropDownCollapsed = true;
                        }

                        //Select a new test option as "selected"
                        if (!ConstructionMenu.destinationDropDown.dropDownCollapsed)
                        {
                            ConstructionMenu.destinationDropDown.mouseClicked(curGameUpdateComponents);
                        }
                    }

                    if (ConstructionMenu.facilityTypeDropDown._isEnabled)
                    {
                        //Collapse or close menu if arrow clicked
                        if (ConstructionMenu.facilityTypeDropDown.dropDownBoxArrow.mouseClicked(curGameUpdateComponents))
                        {
                            if (ConstructionMenu.facilityTypeDropDown.dropDownCollapsed)
                                ConstructionMenu.facilityTypeDropDown.dropDownCollapsed = false;
                            else
                                ConstructionMenu.facilityTypeDropDown.dropDownCollapsed = true;
                        }

                        //Select a new test option as "selected"
                        if (!ConstructionMenu.facilityTypeDropDown.dropDownCollapsed)
                        {
                            ConstructionMenu.facilityTypeDropDown.mouseClicked(curGameUpdateComponents);
                        }
                    }

                    //Check buttons
                    foreach (Controls.FancyButtonControl curBtn in ConstructionMenu.menuButtons)
                    {
                        if (curBtn.mouseClicked(curGameUpdateComponents))
                        {
                            //Exit
                            if (curBtn.ID == "btnExitManuFacilityMenu")
                            {
                                ConstructionMenu = new Controls.GameEngineControls.ConstructionMenuControl();
                            }

                            //Build new facility
                            if (curBtn.ID == "btnContructManuFacilityMenu")
                            {/////////Under construction is going on Type not Entity!!!

                                string strFacilityTypeName = ConstructionMenu.facilityTypeDropDown.textOptions[ConstructionMenu.facilityTypeDropDown.selectedIndex];

                                string strPlanetName = ConstructionMenu.destinationDropDown.textOptions[ConstructionMenu.destinationDropDown.selectedIndex];

                                DataCards.Facility facilCheck = staticDataCards.getFacilityByName(strFacilityTypeName);

                                //InvUnit will be like... An Entity. Maybe I will rename it that later when its a pain in the ass to change it :P
                                GameEngine.PlayerInvObjs.InvUnit newUnit = new GameEngine.PlayerInvObjs.InvUnit();
                                newUnit._underConstruction = true;
                                newUnit.startEntityConstruction(facilCheck, strPlanetName);

                                newUnit.FacilityOwner = new GameEngine.GalacticComponents.Owner(Player1);

                                //Add the Inventory Object to the GroundSpaces->Facilites array
                                curGameUniverse.getPlanetByName(strPlanetName).GroundSpaces.Facilities.Add(newUnit);

                                Player1.curGameResourceMang.invRawMaterials -= facilCheck.baseManufactureCost.ResourceCost;

                                ConstructionMenu = new Controls.GameEngineControls.ConstructionMenuControl();
                            }

                            //Build new Ship
                            if (curBtn.ID == "btnContructManuShipMenu")
                            {/////////Under construction is going on Type not Entity!!!

                                string strFacilityTypeShipName = ConstructionMenu.facilityTypeDropDown.textOptions[ConstructionMenu.facilityTypeDropDown.selectedIndex];

                                string strPlanetName = ConstructionMenu.destinationDropDown.textOptions[ConstructionMenu.destinationDropDown.selectedIndex];

                                DataCards.Ship shipCheck = staticDataCards.getShipByName(strFacilityTypeShipName);

                                //InvUnit will be like... An Entity. Maybe I will rename it that later when its a pain in the ass to change it :P
                                GameEngine.PlayerInvObjs.InvUnit newUnit = new GameEngine.PlayerInvObjs.InvUnit();
                                newUnit._underConstruction = true;
                                newUnit.startEntityConstruction(shipCheck, strPlanetName);

                                newUnit.FacilityOwner = new GameEngine.GalacticComponents.Owner(Player1);

                                //Add ship to orbit
                                curGameUniverse.getPlanetByName(strPlanetName).Orbit.StarshipFleetsInOrbit.Add(newUnit);

                                Player1.curGameResourceMang.invRawMaterials -= 100;//Charging 100 by default

                                ConstructionMenu = new Controls.GameEngineControls.ConstructionMenuControl();
                            }

                            //Build new Troop
                            if (curBtn.ID == "btnContructManuTroopsMenu")
                            {/////////Under construction is going on Type not Entity!!!

                                string strFacilityTypeTroopsName = ConstructionMenu.facilityTypeDropDown.textOptions[ConstructionMenu.facilityTypeDropDown.selectedIndex];

                                string strPlanetName = ConstructionMenu.destinationDropDown.textOptions[ConstructionMenu.destinationDropDown.selectedIndex];

                                DataCards.Troops TroopsCheck = staticDataCards.getTroopsByName(strFacilityTypeTroopsName);

                                //InvUnit will be like... An Entity. Maybe I will rename it that later when its a pain in the ass to change it :P
                                GameEngine.PlayerInvObjs.InvUnit newUnit = new GameEngine.PlayerInvObjs.InvUnit();
                                newUnit._underConstruction = true;
                                newUnit.startEntityConstruction(TroopsCheck, strPlanetName);

                                newUnit.FacilityOwner = new GameEngine.GalacticComponents.Owner(Player1);

                                //Add troops to planet
                                curGameUniverse.getPlanetByName(strPlanetName).GroundSpaces.Troops.Add(newUnit);

                                Player1.curGameResourceMang.invRawMaterials -= 10;//Charging 10 by default

                                ConstructionMenu = new Controls.GameEngineControls.ConstructionMenuControl();
                            }
                        }

                    }

                }

                //Only Check if GP menus are not displayed
                if (this.LeftPlanetMenu._isNull && this.RightPlanetMenu._isNull)
                {
                    //Check Galaxy Clicks
                    foreach (DataCards.Galaxy curGalaxy in this.curGameUniverse.TheUniverse)
                    {
                        string[] strArryXYBounds = curGalaxy.MouseImageAreaCoordinates.Split(';');

                        Model.XYStringToInt topLeft = new Model.XYStringToInt(strArryXYBounds[0]);

                        Model.XYStringToInt bottomRight = new Model.XYStringToInt(strArryXYBounds[1]);

                        if (curGameUpdateComponents._curMouseState.X > topLeft.X && curGameUpdateComponents._curMouseState.X < bottomRight.X)
                        {
                            if (curGameUpdateComponents._curMouseState.Y > topLeft.Y && curGameUpdateComponents._curMouseState.Y < bottomRight.Y)
                            {

                                /////////////////////////////////
                                //Create Galaxy Planets Menu
                                //////////////////////////////////

                                Texture2D curTexture = curGameUpdateComponents._staticTextureImages._galacticPlanetView;
                                //Vector2 curVector = new Vector2(100, 100);
                                //Rectangle curRect = new Rectangle(100, 100, 300, 300);

                                Controls.PlanetsInGalaxyMenu curMenuControl = new Controls.PlanetsInGalaxyMenu();

                                //Start Menu Button List
                                List<Controls.FancyButtonControl> menuButtons = new List<Controls.FancyButtonControl>();

                                //Get Continue Button Settings
                                Texture2D curButtonTexture = curGameUpdateComponents._staticTextureImages._buttonTexture;
                                Vector2 curButtonVector = new Vector2(110, 340);
                                Rectangle curButtonRect = new Rectangle(110, 340, 130, 50);

                                //Add the Continue Button
                                //menuButtons.Add(new GalacticConquest.Controls.FancyButtonControl("btnSaveSettings", curButtonTexture, curButtonVector, curButtonRect, "Save"));

                                //Add the Exit Button
                                curButtonVector = new Vector2(365, 650);
                                curButtonRect = new Rectangle(365, 650, 130, 50);

                                menuButtons.Add(new Controls.FancyButtonControl("btnExitGalaxyMenu", curButtonTexture, curButtonVector, curButtonRect, "Exit"));

                                //Create the Menu Control
                                curMenuControl = new Controls.PlanetsInGalaxyMenu("mnuGalaxy", curTexture, Model.OrientationType.Left, curGalaxy.Name, "...Settings List Here...", menuButtons);

                                curMenuControl.menuPlanetControls = this.curGameUniverse.getPlanetListByGalaxyName(curGalaxy.Name);

                                this.LeftPlanetMenu = curMenuControl;

                                //Add menu control to list
                                //activeImgMenus.Add(curMenuControl);

                            }
                        }

                    }

                }

                checkTopBarMouseClick(curGameUpdateComponents);

            }
        }