Exemple #1
0
    private void AssignerStockEngage()
    {
        Production prod = ScriptableObject.CreateInstance <Production>();

        prod.Initialiser();

        stockEngage = new StockRessource.Inventaire(prod);

        foreach (SlotEchange slot in listeSlots)
        {
            if (slot.Ressource)
            {
                prod.AugmenterGain(slot.Ressource.nom, slot.quantite);
            }
            else if (slot.Consommable)
            {
                stockEngage.consommables.Add(slot.Consommable);
            }
        }

        stockEngage.stockRessource = prod;
    }
Exemple #2
0
 public void EncaisserRessource(string nomRessource, float montant)
 {
     ressourcesEnStock.AugmenterGain(nomRessource, montant);
     LimiterStock();
 }