public Order(RessourceReceiver module, RessourceManager.Ressources r) { this.deliveryModule = module; this.r = r; id = idcounter++; }
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; }
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); }
internal void bookCrate(RessourceManager.Ressources r) { if (bookedCrates.ContainsKey(r)) { ++bookedCrates[r]; } else { bookedCrates.Add(r, 1); } }
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; }
public override void notifyPickUp(RessourceManager.Ressources r) { takeACrate(r); }
public void takeACrate(RessourceManager.Ressources r) { --amounts[r]; --bookedCrates[r]; }
public abstract void notifyPickUp(RessourceManager.Ressources r);
public override void notifyPickUp(RessourceManager.Ressources r) { --loadOutput; }