예제 #1
0
 public void addStoreItem(StoreItem storeItem)
 {
     Point nextLocation = getArrayPosition(nextPos);
     storeItems[nextLocation.X, nextLocation.Y] = storeItem;
     storeItem.SetClickRectangle(new Rectangle(110 + (nextLocation.X * 133), 60 +  (nextLocation.Y * 128), 128, 128));
     storeItem.SetMeatStore(this);
     storeItem.SetTexture();
     nextPos++;
 }
예제 #2
0
 public void spendMeat(StoreItem item)
 {
     if (meatCount >= item.getCost())
     {
         if (item.onBuy())
         {
             meatCount -= item.getCost();
         }
     }
 }