Beispiel #1
0
        //Creates Base Player
        public Player(int startingGold, Board b, Vector3 playerEmpireColor, Flag playerEmpireFlag)
        {
            temp        = false;
            gold        = startingGold;
            science     = hydrogen = oxygen = nitrogen = iron = tungsten = uranium = 0;
            iron        = 5;
            board       = b;
            empireColor = new Color((int)playerEmpireColor.X, (int)playerEmpireColor.Y, (int)playerEmpireColor.Z);
            empireFlag  = playerEmpireFlag;

            shipsAvailableForConstruction = new List <Ship>();
            shipsAvailableForConstruction.Add(new Ship(1, 1, 5, 1200, "Corvette"));
            shipsAvailableForConstruction.Add(new Ship(2, 2, 3, 2000, "Destroyer"));
            shipsAvailableForConstruction.Add(new Ship(3, 4, 3, 3600, "Cruiser"));

            techTreeObject = new TechTree();
        }
Beispiel #2
0
 public void Update(MouseState mouse, MouseState oldMouse, TechTree tree)
 {
     techTreeObject = tree;
     for (int x = 0; x < techButtons.Count; x++)
     {
         techButtons[x].Update(mouse, oldMouse);
     }
     if (techButtons[0].isClicked)
     {
         techTreeObject.techResearching = TechTree.Tech.Attack;
     }
     if (techButtons[1].isClicked)
     {
         techTreeObject.techResearching = TechTree.Tech.Defense;
     }
     if (techButtons[2].isClicked)
     {
         techTreeObject.techResearching = TechTree.Tech.Movement;
     }
     techButtons[0].buttonText = "Attack " + (techTreeObject.attackTechsResearched + 1) + "\nCost: " + ((techTreeObject.attackTechsResearched + 1) * 300);
     techButtons[1].buttonText = "Defense " + (techTreeObject.defenseTechsResearched + 1) + "\nCost: " + ((techTreeObject.defenseTechsResearched + 1) * 300);
     techButtons[2].buttonText = "Movement " + (techTreeObject.movementTechsResearched + 1) + "\nCost: " + ((techTreeObject.movementTechsResearched + 1) * 300);
 }