Beispiel #1
0
 public bool Create(MeshRenderer renderer)
 {
     if (Company.money >= costs[0])
     {
         if (type == types.Factory)
         {
             buildingName = BuildingNames.GenerateName(true);
         }
         else if (type == types.Office)
         {
             buildingName = BuildingNames.GenerateName(false);
         }
         state            = states.Upgrading;
         buildTimeLeft    = buildTime * ((float)tier + 1f);
         Company.money   -= costs[0];
         renderer.enabled = false;
         return(true);
     }
     else
     {
         Destroy(gameObject);
         return(false);
     }
 }