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++; }
public void spendMeat(StoreItem item) { if (meatCount >= item.getCost()) { if (item.onBuy()) { meatCount -= item.getCost(); } } }