Skip to content
Snippets Groups Projects
Commit 88e36374 authored by GIMENEZ TANGUY's avatar GIMENEZ TANGUY
Browse files

Merge branch 'master' into 'master'

Perte de nature quand achat item

See merge request chirz/cityescape!102
parents 684cfd13 429579b4
Branches
No related merge requests found
...@@ -55,6 +55,9 @@ public class Shopping : MonoBehaviour ...@@ -55,6 +55,9 @@ public class Shopping : MonoBehaviour
if ((Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown("joystick button 1")) && playerInRange && sellItem && itemForSale.Count > 0) if ((Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown("joystick button 1")) && playerInRange && sellItem && itemForSale.Count > 0)
{ {
if (!isBuy)
PlayerNature.instance.LooseNature(20);
switch (sellItem.id) switch (sellItem.id)
{ {
case 1: case 1:
...@@ -78,6 +81,7 @@ public class Shopping : MonoBehaviour ...@@ -78,6 +81,7 @@ public class Shopping : MonoBehaviour
Ebutton.GetComponent<CanvasRenderer>().SetAlpha(0f); Ebutton.GetComponent<CanvasRenderer>().SetAlpha(0f);
textEbutton.GetComponent<CanvasRenderer>().SetAlpha(0f); textEbutton.GetComponent<CanvasRenderer>().SetAlpha(0f);
textEbuttonObject.GetComponent<CanvasRenderer>().SetAlpha(0f); textEbuttonObject.GetComponent<CanvasRenderer>().SetAlpha(0f);
Inventory.instance.addItem(sellItem); Inventory.instance.addItem(sellItem);
Debug.Log(sellItem.name.ToString() + " a bien ete ajouté a l'inventaire"); 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