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

merge

parent 83b521b8
Branches
No related merge requests found
This diff is collapsed.
fileFormatVersion: 2
guid: 02c5de57794c3474fb978ab6e3487fb4
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -759,9 +759,9 @@ MonoBehaviour:
nextYear: 1875
year: {fileID: 672131795}
city: {fileID: 1075515021}
scene: Niveau1
scene: sceneRaffael
animmator: {fileID: 1460786684}
name: DUSSELDORF
nom: Dusseldorf
--- !u!4 &1459655252
Transform:
m_ObjectHideFlags: 0
......
This diff is collapsed.
fileFormatVersion: 2
guid: 2cda990e2423bbf4892e6590ba056729
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 4ae30febc4f91474fa9164b85521aaf5
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 1b0bebe128a4e8345a1550a68ad23be1
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -2404,7 +2404,7 @@ PrefabInstance:
objectReference: {fileID: 593755023}
- target: {fileID: -6286016664533736427, guid: a53c5cae22cca3445bbb7e30f12f7110, type: 3}
propertyPath: currentNature
value: 100
value: 80
objectReference: {fileID: 0}
- target: {fileID: 1206561506436264872, guid: a53c5cae22cca3445bbb7e30f12f7110, type: 3}
propertyPath: m_SortingOrder
......@@ -2422,6 +2422,10 @@ PrefabInstance:
propertyPath: speed
value: 70
objectReference: {fileID: 0}
- target: {fileID: 1206561506436264875, guid: a53c5cae22cca3445bbb7e30f12f7110, type: 3}
propertyPath: stage
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1206561506436264875, guid: a53c5cae22cca3445bbb7e30f12f7110, type: 3}
propertyPath: player
value:
......@@ -2432,11 +2436,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1206561506436264879, guid: a53c5cae22cca3445bbb7e30f12f7110, type: 3}
propertyPath: m_LocalPosition.x
value: -14.6
value: 23.55
objectReference: {fileID: 0}
- target: {fileID: 1206561506436264879, guid: a53c5cae22cca3445bbb7e30f12f7110, type: 3}
propertyPath: m_LocalPosition.y
value: 38.73
value: 1.76
objectReference: {fileID: 0}
- target: {fileID: 1206561506436264879, guid: a53c5cae22cca3445bbb7e30f12f7110, type: 3}
propertyPath: m_LocalPosition.z
......@@ -55865,7 +55869,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2041949052}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -11.13, y: 39.12, z: -10}
m_LocalPosition: {x: 15.28, y: 5.47, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
......@@ -14,7 +14,7 @@ public class Dialog : MonoBehaviour
// singleton
public static Dialog instance;
private void Awake()
private void Awake()
{
if (instance != null)
{
......@@ -45,17 +45,14 @@ public class Dialog : MonoBehaviour
this.dialog = 0;
string[] DialogsLvl1 = {
"Coucou",
"Je fais un test pour le niveau 1",
"Ca marche bien nan ?",
"Melvyn t moch",
"Valentin aussi",
"Raff est pas bo"
string[] DialogsStart = {
"Ach... Encore ein gute chournée dans mon fillage!",
"Ch'ai très enfie te me balader",
"Che defrai aller au Nord dans la forêt ja !"
};
this.ListDialogs.Add("start", DialogsLvl1);
this.ListDialogs.Add("start", DialogsStart);
string[] Dialogsraff = {
"Salut",
......@@ -127,19 +124,19 @@ public class Dialog : MonoBehaviour
if ((Input.GetKeyDown(KeyCode.Space) || Input.GetKeyDown("joystick button 0")) && dialogActive)
this.Next();
// DEBUG
if ((Input.GetKeyDown(KeyCode.H) || Input.GetKeyDown("joystick button 1")))
this.dialogActive = !this.dialogActive;
// // DEBUG
// if ((Input.GetKeyDown(KeyCode.H) || Input.GetKeyDown("joystick button 1")))
// this.dialogActive = !this.dialogActive;
// DEBUG
if (Input.GetKeyDown(KeyCode.F))
{
Debug.Log("tut");
this.setSituation("marchand");
}
if(this.dialogActive)
// // DEBUG
// if (Input.GetKeyDown(KeyCode.F))
// {
// Debug.Log("tut");
// this.setSituation("marchand");
// }
if (this.dialogActive)
{
this.dialogBox.GetComponent<CanvasRenderer>().SetAlpha(1f);
this.dialogText.GetComponent<CanvasRenderer>().SetAlpha(1f);
......
......@@ -31,7 +31,7 @@ public class loadScene : MonoBehaviour
SceneManager.LoadScene(scene);
}
......@@ -42,11 +42,6 @@ public class loadScene : MonoBehaviour
// Update is called once per frame
void Update()
{
if(PlayerNature.instance.currentNature <= 0)
{
ChargerScene();
PlayerNature.instance.currentNature = 100;
}
}
public void ExitGame()
......
......@@ -7,7 +7,7 @@ public class Shopping : MonoBehaviour
{
private bool playerInRange;
private bool isBuy=false;
private bool isBuy = false;
public Item sellItem = null;
//public GameObject[] itemForSale = new GameObject[2];
public List<GameObject> itemForSale = new List<GameObject>();
......@@ -27,51 +27,51 @@ public class Shopping : MonoBehaviour
Ebutton.GetComponent<CanvasRenderer>().SetAlpha(0f);
textEbutton.GetComponent<CanvasRenderer>().SetAlpha(0f);
textEbuttonObject.GetComponent<CanvasRenderer>().SetAlpha(0f);
}
// Update is called once per frame
void Update()
{
if(playerInRange)
if (playerInRange)
{
switch (sellItem.id)
{
case 1:
textEbuttonObject.GetComponent<Text>().text="Chaussures de marche";
textEbuttonObject.GetComponent<Text>().text = "Chaussures de marche";
break;
case 2:
textEbuttonObject.GetComponent<Text>().text="Bâton de marche";
textEbuttonObject.GetComponent<Text>().text = "Bâton de marche";
break;
case 3:
textEbuttonObject.GetComponent<Text>().text="Réchaud";
textEbuttonObject.GetComponent<Text>().text = "Réchaud";
break;
case 4:
textEbuttonObject.GetComponent<Text>().text="Tente";
textEbuttonObject.GetComponent<Text>().text = "Tente";
break;
}
}
if (Input.GetKeyDown(KeyCode.E) && playerInRange && sellItem && itemForSale.Count>0)
if ((Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown("joystick button 1")) && playerInRange && sellItem && itemForSale.Count > 0)
{
switch (sellItem.id)
{
case 1:
Dialog.instance.setSituation("boutiqueChaussure");
isBuy=true;
isBuy = true;
break;
case 2:
Dialog.instance.setSituation("boutiqueBaton");
isBuy=true;
isBuy = true;
break;
case 3:
Dialog.instance.setSituation("boutiqueRechaud");
isBuy=true;
isBuy = true;
break;
case 4:
Dialog.instance.setSituation("boutiqueTente");
isBuy=true;
isBuy = true;
break;
}
panelEbutton.GetComponent<CanvasRenderer>().SetAlpha(0f);
......@@ -88,14 +88,14 @@ public class Shopping : MonoBehaviour
if (collision.CompareTag("Player"))
{
playerInRange = true;
if(isBuy==false)
if (isBuy == false)
{
panelEbutton.GetComponent<CanvasRenderer>().SetAlpha(1f);
Ebutton.GetComponent<CanvasRenderer>().SetAlpha(1f);
textEbutton.GetComponent<CanvasRenderer>().SetAlpha(1f);
textEbuttonObject.GetComponent<CanvasRenderer>().SetAlpha(1f);
}
}
}
......
......@@ -5,12 +5,12 @@ EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/Scenes/Niveau1.unity
guid: 2cda990e2423bbf4892e6590ba056729
- enabled: 1
path: Assets/Scenes/Menu.unity
guid: 458707c07ba6b4b4297fc1de6ac38622
- enabled: 1
path: Assets/Scenes/Niveau1.unity
guid: 2cda990e2423bbf4892e6590ba056729
- enabled: 1
path: Assets/Scenes/sceneRaffael.unity
guid: bdf7662389bf8487c9a7909d08af8c3e
......@@ -20,4 +20,7 @@ EditorBuildSettings:
- enabled: 1
path: Assets/Scenes/Niveau2.unity
guid: 4ae30febc4f91474fa9164b85521aaf5
- enabled: 1
path: Assets/Scenes/sceneTanguy.unity
guid: b45818539c00d614f8e62d9be90b08c7
m_configObjects: {}
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