Skip to content
Snippets Groups Projects
Commit 74ba8397 authored by BLOCH VALENTIN's avatar BLOCH VALENTIN
Browse files

Merge branch 'master' into 'master'

correction de bug

See merge request chirz/cityescape!35
parents f18cb762 a1431845
No related merge requests found
......@@ -1192,27 +1192,6 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9cdcd3ac7314fd649bf366c8fd2a4460, type: 3}
--- !u!1 &677944535 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1705879581494847332, guid: 2e4037a1db4798249a09bbff07baad2e, type: 3}
m_PrefabInstance: {fileID: 436635088}
m_PrefabAsset: {fileID: 0}
--- !u!114 &677944537
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 677944535}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 96efccd7704b37949a51739ed18bbd7d, type: 3}
m_Name:
m_EditorClassIdentifier:
dialogBox: {fileID: 677944535}
dialogText: {fileID: 1096980514}
dialog: 0
dialogActive: 0
--- !u!1001 &731852596
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -4122,7 +4101,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
itemNeeded: {fileID: 11400000, guid: 951b6ca289a8358458e441a19c5cc460, type: 2}
inventory: {fileID: 2095041422}
collider: {fileID: 1084412260}
--- !u!61 &1084412260
BoxCollider2D:
......@@ -4164,17 +4142,6 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1096980514 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1778026432316727230, guid: 2e4037a1db4798249a09bbff07baad2e, type: 3}
m_PrefabInstance: {fileID: 436635088}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1166591758
GameObject:
m_ObjectHideFlags: 0
......
......@@ -76,11 +76,17 @@ public class Dialog : MonoBehaviour
"Ouvrir le menu c'est avec",
"la touche E chacal"
};
this.ListDialogs.Add("Marchand", DialogMarchand);
string[] DialogChaussure = {
"J'ai mal au pied",
"Faux an acheté des mieu"
};
this.ListDialogs.Add("Chaussures", DialogChaussure);
this.ListDialogs.Add("marchand", DialogMarchand);
if (this.dialogActive)
this.Situation("start");
this.setSituation("start");
}
// Update is called once per frame
......@@ -98,7 +104,7 @@ public class Dialog : MonoBehaviour
{
Debug.Log("tut");
this.Situation("marchand");
this.setSituation("marchand");
}
if(this.dialogActive)
......@@ -125,9 +131,11 @@ public class Dialog : MonoBehaviour
}
// Ouvre une bulle de dialogue dans une situation donnée
void Situation(string sit)
public void setSituation(string sit)
{
Debug.Log("actionvation: " + sit);
this.situation = sit;
Debug.Log("situation" + this.situation);
this.dialog = 0;
this.dialogActive = true;
......
......@@ -5,7 +5,6 @@ using UnityEngine;
public class Border : MonoBehaviour
{
public Item itemNeeded;
public Inventory inventory;
public BoxCollider2D collider;
private void OnCollisionEnter2D(Collision2D collision)
......@@ -14,15 +13,17 @@ public class Border : MonoBehaviour
{
Debug.Log("JE TOUCHE LA BORDEER");
if (inventory.hasItem(itemNeeded))
if (Inventory.instance.hasItem(itemNeeded))
{
Debug.Log("Je possde l'item ncessaire");
collider.enabled = false;
}
else
Debug.Log("Je ne possde pas l'item ncessaire");
{
Debug.Log("Je n'ai pas l'item ncessaire");
Dialog.instance.setSituation("Chaussures");
}
}
}
......
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