Undo last purchase working again
Added Comments to AnimalShop, ItemShop and ShopUI classes
This commit is contained in:
parent
441ffb900a
commit
c01c592976
7 changed files with 25 additions and 194 deletions
|
|
@ -16,8 +16,8 @@ namespace Shop {
|
|||
}
|
||||
|
||||
/**
|
||||
* Clears the Shop Slot
|
||||
*/
|
||||
* Clears the Shop Slot
|
||||
*/
|
||||
public override void ClearSlot() {
|
||||
nameText.text = "";
|
||||
costText.text = "";
|
||||
|
|
@ -26,8 +26,8 @@ namespace Shop {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets called when the Shop Slot is clicked
|
||||
*/
|
||||
* Gets called when the Shop Slot is clicked
|
||||
*/
|
||||
public override void UseElement() {
|
||||
if(Element) {
|
||||
if(_playerController.Money >= Element.price) {
|
||||
|
|
@ -36,7 +36,6 @@ namespace Shop {
|
|||
_itemShop.itemWasBought = true;
|
||||
// Debug.Log("Buying Item: " + Element.displayName);
|
||||
}
|
||||
|
||||
_inventory.AddElement(Element, 1);
|
||||
_itemShop.RemoveElement(Element, 1);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue