Skip to content
Snippets Groups Projects
Commit 429579b4 authored by Raffael Di Pietro's avatar Raffael Di Pietro
Browse files

Perte de nature quand achat item

parent 55120ed3
Branches
No related merge requests found
......@@ -55,6 +55,9 @@ public class Shopping : MonoBehaviour
if ((Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown("joystick button 1")) && playerInRange && sellItem && itemForSale.Count > 0)
{
if (!isBuy)
PlayerNature.instance.LooseNature(20);
switch (sellItem.id)
{
case 1:
......@@ -78,6 +81,7 @@ public class Shopping : MonoBehaviour
Ebutton.GetComponent<CanvasRenderer>().SetAlpha(0f);
textEbutton.GetComponent<CanvasRenderer>().SetAlpha(0f);
textEbuttonObject.GetComponent<CanvasRenderer>().SetAlpha(0f);
Inventory.instance.addItem(sellItem);
Debug.Log(sellItem.name.ToString() + " a bien ete ajouté a l'inventaire");
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment