Exemple #1
0
    public Order(RessourceReceiver module, RessourceManager.Ressources r)
    {
        this.deliveryModule = module;
        this.r = r;

        id = idcounter++;
    }
Exemple #2
0
 public Recipe(RessourceManager.Ressources input, int nbInput, RessourceManager.Ressources output, int nbOutput, int rawProcessTime)
 {
     this.input            = input;
     this.nbInput          = nbInput;
     this.output           = output;
     this.nbOutput         = nbOutput;
     this.rawTimeToProcess = rawProcessTime;
 }
Exemple #3
0
    public bool hasResource(RessourceManager.Ressources r)
    {
        if (amounts.ContainsKey(r))
        {
            int amount = amounts[r] - (bookedCrates.ContainsKey(r) ? bookedCrates[r] : 0);
            return(amounts[r] != 0);
        }

        return(false);
    }
Exemple #4
0
 internal void bookCrate(RessourceManager.Ressources r)
 {
     if (bookedCrates.ContainsKey(r))
     {
         ++bookedCrates[r];
     }
     else
     {
         bookedCrates.Add(r, 1);
     }
 }
Exemple #5
0
    public void setType(RessourceManager.Ressources r)
    {
        this.r = r;

        Color c = Color.red;

        switch (r)
        {
        case RessourceManager.Ressources.Iron:
            c = Color.black;
            break;

        case RessourceManager.Ressources.RawIron:
            c = Color.grey;
            break;
        }

        GetComponent <Renderer>().material.color = c;
    }
Exemple #6
0
 public override void notifyPickUp(RessourceManager.Ressources r)
 {
     takeACrate(r);
 }
Exemple #7
0
 public void takeACrate(RessourceManager.Ressources r)
 {
     --amounts[r];
     --bookedCrates[r];
 }
Exemple #8
0
 public abstract void notifyPickUp(RessourceManager.Ressources r);
 public override void notifyPickUp(RessourceManager.Ressources r)
 {
     --loadOutput;
 }