示例#1
0
 public Inventory(MaterialBox newBox)
 {
     wood  = newBox;
     plank = newBox;
     ore   = newBox;
     ingot = newBox;
 }
示例#2
0
 void TryPutInMat(MaterialBox siteMat, MaterialBox agentMat)
 {
     if (!siteMat.HasSpace() || !agentMat.HasAmount(0))
     {
         return;
     }
     agentMat.Current--;
     siteMat.Current++;
 }
示例#3
0
 void TryTakeOutMat(MaterialBox siteMat, MaterialBox agentMat)
 {
     if (!siteMat.HasAmount(0) || !agentMat.HasSpace())
     {
         return;
     }
     agentMat.Current++;
     siteMat.Current--;
 }