예제 #1
0
 public Upgrade(string _name, string _tooltip, Ressources _cost, Ressources _modifier)
 {
     name     = _name;
     tooltip  = _tooltip;
     cost     = _cost;
     modifier = _modifier;
 }
예제 #2
0
 public Upgrade(string _name, string _tooltip, string _cost, string _modifier)
 {
     name     = _name;
     tooltip  = _tooltip;
     cost     = new Ressources(_cost);
     modifier = new Ressources(_modifier);
 }
예제 #3
0
 public void SubRessources(Ressources subtractor)
 {
     wood -= subtractor.wood;
     food -= subtractor.food;
     ore  -= subtractor.ore;
     army -= subtractor.army;
 }
예제 #4
0
 public void AddRessources(Ressources adder)
 {
     wood += adder.wood;
     food += adder.food;
     ore  += adder.ore;
     army += adder.army;
 }
예제 #5
0
        public Upgrade()
        {
            name    = "no name";
            tooltip = "no tooltip";

            cost     = new Ressources();
            modifier = new Ressources();
        }
예제 #6
0
 public bool CanAfford(Ressources price)
 {
     if (ressources.food >= price.food &&
         ressources.wood >= price.wood &&
         ressources.ore >= price.ore &&
         ressources.army >= price.army)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #7
0
 public Player(Ressources _ressources)
 {
     ressources = _ressources;
 }