public void SellWeddingCake() { //adjust the player's balance //player is no longer holding an item _balance += WeddingCake.WEDDINGCAKE_SELL_PRICE; _itemHolding = null; _isHolding = false; }
//Sell a pumpkin public void SellPumpkin() { //adjust the player's balance //player is no longer holding an item _balance += Pumpkin.PUMPKIN_SELL_PRICE; _itemHolding = null; _isHolding = false; }
//Sell a radish public void SellRadish() { //adjust the player's balance //player is no longer holding an item _balance += Radish.RADISH_SELL_PRICE; _itemHolding = null; _isHolding = false; }
//Buys a pumpking crop object public void BuyPumpkin() { if (Balance >= Pumpkin.PUMPKIN_BUY_PRICE) { _balance -= Pumpkin.PUMPKIN_BUY_PRICE; _itemHolding = new Pumpkin(0, PlayerLocation.X, PlayerLocation.Y, false); _isHolding = true; } }
public void BuyWeddingCake() { if (Balance >= WeddingCake.WEDDINGCAKE_BUY_PRICE) { // maybe change to captial get one _balance -= WeddingCake.WEDDINGCAKE_BUY_PRICE; _itemHolding = new WeddingCake(0, PlayerLocation.X, PlayerLocation.Y, false); _isHolding = true; } }
public void BuyRadish() { if (IsHoldingItem == false) { if (Balance >= Radish.RADISH_BUY_PRICE) { _balance -= Radish.RADISH_BUY_PRICE; _itemHolding = new Radish(0, PlayerLocation.X, PlayerLocation.Y, false); _isHolding = true; } } }
public void GiftItem() { _isHolding = false; _itemHolding = null; }
/// <summary> /// Picks up the crop infront of the player /// </summary> /// <param name="crop">crop item that is to be picked up </param> public void PickUpCrop(Crops crop) { //player is holding an crop item _itemHolding = crop; _isHolding = true; }
//Places crop on the ground public void DropCrop() { //player is no longer holding item _itemHolding = null; _isHolding = false; }