Esempio n. 1
0
 private void InitBuildingSelector()
 {
     buildingSelector.Clear();
     for (int i = 0; i < Building.nbBuildings; i++)
     {
         Building.Type type = (Building.Type)i;
         buildingSelector.AddItem(type.ToString(), Building.textures[type]);
     }
 }
Esempio n. 2
0
 private void SetDescription(Building.Type type)
 {
     imageDesc.Texture    = Building.textures[type];
     titleDesc.Text       = type.ToString();
     timeDesc.Text        = Building.times2Create[type].ToString() + "s";
     energyDesc.Text      = "-> " + (Building.times2Create[type] * Printer3D.power) + "e";
     descriptionDesc.Text = Building.descriptions[type];
     ClearItemsList();
     foreach (var loot in Building.crafts[type].loots)
     {
         Control it = (Control)itemBox.Instance();
         it.GetNode <TextureRect>("img").Texture = Item.textures[(int)loot.type];
         it.GetNode <Label>("texte").Text        = Player.inventoryItems.GetItemCount(loot.type) + "/" + loot.amount;
         itemListDesc.AddChild(it);
     }
 }