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

Correction de warning et d'erreurs (j'aime pas le rouge dans la console mdr)

parent 6e826a21
No related merge requests found
...@@ -5,7 +5,7 @@ using UnityEngine; ...@@ -5,7 +5,7 @@ using UnityEngine;
public class Border : MonoBehaviour public class Border : MonoBehaviour
{ {
public Item itemNeeded; public Item itemNeeded;
public BoxCollider2D collider; public BoxCollider2D forestCollider;
private void OnCollisionEnter2D(Collision2D collision) private void OnCollisionEnter2D(Collision2D collision)
{ {
...@@ -16,7 +16,7 @@ public class Border : MonoBehaviour ...@@ -16,7 +16,7 @@ public class Border : MonoBehaviour
if (Inventory.instance.hasItem(itemNeeded)) if (Inventory.instance.hasItem(itemNeeded))
{ {
Debug.Log("Je possde l'item ncessaire"); Debug.Log("Je possde l'item ncessaire");
collider.enabled = false; forestCollider.enabled = false;
} }
else else
......
...@@ -6,7 +6,7 @@ using UnityEngine; ...@@ -6,7 +6,7 @@ using UnityEngine;
public class Item : ScriptableObject { public class Item : ScriptableObject {
public int id; public int id;
public string name; public string nom;
public string description; public string description;
public Sprite image; public Sprite image;
......
...@@ -14,14 +14,14 @@ public class loadScene : MonoBehaviour ...@@ -14,14 +14,14 @@ public class loadScene : MonoBehaviour
public string scene; public string scene;
public Animator animmator; public Animator animmator;
public string name; public string nom;
public void ChargerScene() public void ChargerScene()
{ {
animmator.SetBool("Change", true); animmator.SetBool("Change", true);
year.text = "" + nextYear; year.text = "" + nextYear;
city.text = name; city.text = nom;
StartCoroutine(nextLevelTimer()); StartCoroutine(nextLevelTimer());
} }
......
...@@ -36,7 +36,6 @@ public class Shopping : MonoBehaviour ...@@ -36,7 +36,6 @@ public class Shopping : MonoBehaviour
break; break;
} }
Inventory.instance.addItem(sellItem); Inventory.instance.addItem(sellItem);
Destroy(itemForSale[0]);
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