Skip to content
Snippets Groups Projects
Commit f473310d authored by Juliette Marx's avatar Juliette Marx
Browse files

modifs gérer couleur objet

parent 164f6cd7
No related branches found
No related tags found
No related merge requests found
......@@ -491,7 +491,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: bed775a3b5a9aa74c9d2cd61baf24cd6, type: 3}
propertyPath: m_RootOrder
value: 59
value: 58
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: bed775a3b5a9aa74c9d2cd61baf24cd6, type: 3}
propertyPath: m_LocalScale.x
......@@ -993,7 +993,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: fba63669f6a7f0043b011f29b01caacf, type: 3}
propertyPath: m_RootOrder
value: 38
value: 37
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: fba63669f6a7f0043b011f29b01caacf, type: 3}
propertyPath: m_LocalScale.x
......@@ -1499,7 +1499,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: f9ae4525a6669984188652fe9f6d34ce, type: 3}
propertyPath: m_RootOrder
value: 39
value: 38
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: f9ae4525a6669984188652fe9f6d34ce, type: 3}
propertyPath: m_LocalScale.x
......@@ -1851,6 +1851,7 @@ MonoBehaviour:
textEau: {fileID: 173000665}
textReanimation: {fileID: 1263640965}
textTension: {fileID: 1604842502}
healthBar: {fileID: 401923662}
--- !u!23 &180806347
MeshRenderer:
m_ObjectHideFlags: 0
......@@ -2446,7 +2447,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: f4e27a5a272dbff4cbc4d82f07bc03b8, type: 3}
propertyPath: m_RootOrder
value: 46
value: 45
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: f4e27a5a272dbff4cbc4d82f07bc03b8, type: 3}
propertyPath: m_LocalScale.x
......@@ -2808,7 +2809,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: b00570a4b46be06448cddce8fe29987a, type: 3}
propertyPath: m_RootOrder
value: 41
value: 40
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: b00570a4b46be06448cddce8fe29987a, type: 3}
propertyPath: m_LocalScale.x
......@@ -3577,6 +3578,7 @@ GameObject:
- component: {fileID: 401923659}
- component: {fileID: 401923661}
- component: {fileID: 401923660}
- component: {fileID: 401923662}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
......@@ -3639,6 +3641,19 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 401923658}
m_CullTransparentMesh: 0
--- !u!114 &401923662
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 401923658}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9fb8585cdfd32de9f80c4b55deb02654, type: 3}
m_Name:
m_EditorClassIdentifier:
healthbar_1: {fileID: 401923660}
--- !u!1 &404634515
GameObject:
m_ObjectHideFlags: 0
......@@ -3805,7 +3820,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 5a7b851e69a0aaf46952ff598312cc9d, type: 3}
propertyPath: m_RootOrder
value: 54
value: 52
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 5a7b851e69a0aaf46952ff598312cc9d, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
......@@ -4988,6 +5003,7 @@ MonoBehaviour:
textMedicament: {fileID: 1712099741}
textReanimation: {fileID: 17421395}
textPansement: {fileID: 262639569}
healthBar: {fileID: 1249204169}
--- !u!65 &655797268
BoxCollider:
m_ObjectHideFlags: 0
......@@ -5791,7 +5807,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: fba63669f6a7f0043b011f29b01caacf, type: 3}
propertyPath: m_RootOrder
value: 56
value: 55
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: fba63669f6a7f0043b011f29b01caacf, type: 3}
propertyPath: m_LocalScale.x
......@@ -6079,7 +6095,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 5a7b851e69a0aaf46952ff598312cc9d, type: 3}
propertyPath: m_RootOrder
value: 36
value: 59
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 5a7b851e69a0aaf46952ff598312cc9d, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
......@@ -6590,7 +6606,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: e177f1a19cdb204409559bb0b462bb0e, type: 3}
propertyPath: m_RootOrder
value: 53
value: 51
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: e177f1a19cdb204409559bb0b462bb0e, type: 3}
propertyPath: m_LocalScale.x
......@@ -6863,7 +6879,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: fba63669f6a7f0043b011f29b01caacf, type: 3}
propertyPath: m_RootOrder
value: 47
value: 46
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: fba63669f6a7f0043b011f29b01caacf, type: 3}
propertyPath: m_LocalScale.x
......@@ -8259,7 +8275,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: a13ff3fd36bab714d92e57f025cb369a, type: 3}
propertyPath: m_RootOrder
value: 40
value: 39
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: a13ff3fd36bab714d92e57f025cb369a, type: 3}
propertyPath: m_LocalScale.x
......@@ -8755,6 +8771,7 @@ MonoBehaviour:
eauEnfant: {fileID: 1546354732}
chrono: 0
enfant: {fileID: 180806343}
healthBar: {fileID: 401923662}
--- !u!1 &1169251996
GameObject:
m_ObjectHideFlags: 0
......@@ -8818,7 +8835,6 @@ Transform:
- {fileID: 2026754405}
- {fileID: 1270552546}
- {fileID: 378006063}
- {fileID: 848409997}
- {fileID: 2059516541}
- {fileID: 85129952}
- {fileID: 180734128}
......@@ -8834,14 +8850,15 @@ Transform:
- {fileID: 1727635011}
- {fileID: 1443871835}
- {fileID: 1599324457}
- {fileID: 1465206075}
- {fileID: 902532758}
- {fileID: 417458868}
- {fileID: 1465206075}
- {fileID: 1806991827}
- {fileID: 712241316}
- {fileID: 1988139550}
- {fileID: 2118977400}
- {fileID: 44259770}
- {fileID: 848409997}
- {fileID: 483971855}
- {fileID: 213214030}
- {fileID: 860412892}
......@@ -9298,6 +9315,7 @@ GameObject:
- component: {fileID: 1249204166}
- component: {fileID: 1249204168}
- component: {fileID: 1249204167}
- component: {fileID: 1249204169}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
......@@ -9360,6 +9378,19 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1249204165}
m_CullTransparentMesh: 0
--- !u!114 &1249204169
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1249204165}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b87c668342b072ac9baf3c52bb54d32f, type: 3}
m_Name:
m_EditorClassIdentifier:
healthbar_1: {fileID: 1249204167}
--- !u!1001 &1254397459
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -10155,7 +10186,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: ea8451f8864741349afff1313aafaab2, type: 3}
propertyPath: m_RootOrder
value: 42
value: 41
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: ea8451f8864741349afff1313aafaab2, type: 3}
propertyPath: m_LocalScale.x
......@@ -10697,8 +10728,16 @@ MonoBehaviour:
textMedicament: {fileID: 1712099741}
textReanimation: {fileID: 17421395}
textPansement: {fileID: 262639569}
perfusionHomme: {fileID: 276459948}
foodHomme: {fileID: 2118977401}
thermometreHomme: {fileID: 1001887580}
medicamentHomme: {fileID: 902532759}
reanimerHomme: {fileID: 2138346769}
pansementHomme: {fileID: 417458869}
chrono: 0
homme: {fileID: 655797264}
healthBar: {fileID: 1249204169}
rouge: {fileID: 0}
--- !u!1001 &1347544157
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -11118,7 +11157,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: b00570a4b46be06448cddce8fe29987a, type: 3}
propertyPath: m_RootOrder
value: 50
value: 49
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: b00570a4b46be06448cddce8fe29987a, type: 3}
propertyPath: m_LocalScale.x
......@@ -11307,7 +11346,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 6a39a98cb1ac64344bdaa33e092102c3, type: 3}
propertyPath: m_RootOrder
value: 52
value: 53
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 6a39a98cb1ac64344bdaa33e092102c3, type: 3}
propertyPath: m_LocalScale.x
......@@ -11456,6 +11495,7 @@ GameObject:
- component: {fileID: 1486346266}
- component: {fileID: 1486346268}
- component: {fileID: 1486346267}
- component: {fileID: 1486346269}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
......@@ -11518,6 +11558,19 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1486346265}
m_CullTransparentMesh: 0
--- !u!114 &1486346269
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1486346265}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1f3df084a3f602224a14016cb105e4bb, type: 3}
m_Name:
m_EditorClassIdentifier:
healthbar_1: {fileID: 1486346267}
--- !u!1001 &1492195228
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -11726,7 +11779,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 6a39a98cb1ac64344bdaa33e092102c3, type: 3}
propertyPath: m_RootOrder
value: 43
value: 42
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 6a39a98cb1ac64344bdaa33e092102c3, type: 3}
propertyPath: m_LocalScale.x
......@@ -12248,8 +12301,15 @@ MonoBehaviour:
textPansement: {fileID: 180753726}
textToilette: {fileID: 1300778534}
textTension: {fileID: 1655702650}
foodFemme: {fileID: 1013249124}
thermometreFemme: {fileID: 1757982856}
medicamentFemme: {fileID: 127808288}
pansementFemme: {fileID: 848409998}
servietteFemme: {fileID: 1270552547}
tensionFemme: {fileID: 1040144080}
chrono: 0
femme: {fileID: 2136404302}
healthBar: {fileID: 1486346269}
--- !u!1 &1593648113
GameObject:
m_ObjectHideFlags: 0
......@@ -12325,7 +12385,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: ea8451f8864741349afff1313aafaab2, type: 3}
propertyPath: m_RootOrder
value: 51
value: 50
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: ea8451f8864741349afff1313aafaab2, type: 3}
propertyPath: m_LocalScale.x
......@@ -13398,7 +13458,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 5a7b851e69a0aaf46952ff598312cc9d, type: 3}
propertyPath: m_RootOrder
value: 45
value: 44
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 5a7b851e69a0aaf46952ff598312cc9d, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
......@@ -13692,7 +13752,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: bbcb59a02f058d14c9ed12e01ba81893, type: 3}
propertyPath: m_RootOrder
value: 49
value: 48
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: bbcb59a02f058d14c9ed12e01ba81893, type: 3}
propertyPath: m_LocalScale.x
......@@ -14295,7 +14355,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: f4e27a5a272dbff4cbc4d82f07bc03b8, type: 3}
propertyPath: m_RootOrder
value: 55
value: 54
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: f4e27a5a272dbff4cbc4d82f07bc03b8, type: 3}
propertyPath: m_LocalScale.x
......@@ -15101,7 +15161,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: e177f1a19cdb204409559bb0b462bb0e, type: 3}
propertyPath: m_RootOrder
value: 44
value: 43
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: e177f1a19cdb204409559bb0b462bb0e, type: 3}
propertyPath: m_LocalScale.x
......@@ -15459,7 +15519,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: bed775a3b5a9aa74c9d2cd61baf24cd6, type: 3}
propertyPath: m_RootOrder
value: 57
value: 56
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: bed775a3b5a9aa74c9d2cd61baf24cd6, type: 3}
propertyPath: m_LocalScale.x
......@@ -15890,7 +15950,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: f9ae4525a6669984188652fe9f6d34ce, type: 3}
propertyPath: m_RootOrder
value: 48
value: 47
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: f9ae4525a6669984188652fe9f6d34ce, type: 3}
propertyPath: m_LocalScale.x
......@@ -16150,7 +16210,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: f4e27a5a272dbff4cbc4d82f07bc03b8, type: 3}
propertyPath: m_RootOrder
value: 37
value: 36
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: f4e27a5a272dbff4cbc4d82f07bc03b8, type: 3}
propertyPath: m_LocalScale.x
......@@ -16398,7 +16458,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: bed775a3b5a9aa74c9d2cd61baf24cd6, type: 3}
propertyPath: m_RootOrder
value: 58
value: 57
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: bed775a3b5a9aa74c9d2cd61baf24cd6, type: 3}
propertyPath: m_LocalScale.x
......@@ -16916,6 +16976,7 @@ MonoBehaviour:
textMedicament: {fileID: 519096570}
textToilette: {fileID: 1300778534}
textPansement: {fileID: 180753726}
healthBar: {fileID: 1486346269}
--- !u!23 &2136404305
MeshRenderer:
m_ObjectHideFlags: 0
......
......@@ -21,6 +21,8 @@ public class IsOnContactPatient2 : MonoBehaviour
public Text textReanimation;
public Text textPansement;
public HealthBar_2 healthBar;
public void OnTriggerStay(Collider other)
{
......@@ -31,7 +33,7 @@ public class IsOnContactPatient2 : MonoBehaviour
if (chronoTemperature >= 5.0f)
{
textTemperature.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -42,7 +44,7 @@ public class IsOnContactPatient2 : MonoBehaviour
if (chronoPerfusion >= 5.0f)
{
textPerfusion.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -53,7 +55,7 @@ public class IsOnContactPatient2 : MonoBehaviour
if (chronoNourriture >= 5.0f)
{
textNourriture.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -64,7 +66,7 @@ public class IsOnContactPatient2 : MonoBehaviour
if (chronoMedicament >= 5.0f)
{
textMedicament.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -75,7 +77,7 @@ public class IsOnContactPatient2 : MonoBehaviour
if (chronoReanimation >= 5.0f)
{
textReanimation.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -86,7 +88,7 @@ public class IsOnContactPatient2 : MonoBehaviour
if (chronoPansement >= 5.0f)
{
textPansement.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......
......@@ -16,43 +16,55 @@ public class ScreenP2Controller : MonoBehaviour
public Text textReanimation;
public Text textPansement;
public GameObject perfusionHomme;
public GameObject foodHomme;
public GameObject thermometreHomme;
public GameObject medicamentHomme;
public GameObject reanimerHomme;
public GameObject pansementHomme;
public float chrono = 0.0f;
public GameObject homme;
public HealthBar_2 healthBar;
public Texture rouge;
public void UpdateTasksToDo()
{
//Première série de tâches
if (45.0f < chrono & chrono < 46.0f)
{
//diminuer jauge de vie
homme.GetComponent<MeshRenderer>().material.color = Color.red;
healthBar.Heal(80);
thermometreHomme.GetComponent<Renderer>().material.mainTexture = rouge;
textTemperature.enabled = true;
}
if (chrono > 90.0f & chrono < 91.0f & textTemperature.enabled == true)
{
//diminuer jauge de vie
healthBar.Heal(60);
textTemperature.enabled = false;
textMedicament.enabled = true;
}
if (chrono > 120.0f & chrono < 121.0f & textMedicament.enabled == true)
{
//diminuer jauge de vie
healthBar.Heal(40);
textMedicament.enabled = false;
textPerfusion.enabled = true;
}
if (chrono > 150.0f & chrono < 151.0f & textPerfusion.enabled == true)
{
//diminuer jauge de vie
healthBar.Heal(20);
textPerfusion.enabled = false;
textReanimation.enabled = true;
}
if (chrono > 170.0f & textReanimation == true)
{
healthBar.Heal(0);
//mort du patient car jauge de vie =0
}
......@@ -65,33 +77,34 @@ public class ScreenP2Controller : MonoBehaviour
//Deuxième série de tâches
if (chrono > 235.0f & chrono < 236.0f)
{
//diminuer jauge de vie
healthBar.Heal(80);
homme.GetComponent<MeshRenderer>().material.color = Color.red;
textPansement.enabled = true;
}
if (chrono > 265.0f & chrono < 266.0f & textPansement.enabled == true)
{
//diminuer jauge de vie
healthBar.Heal(60);
textPansement.enabled = false;
textMedicament.enabled = true;
}
if (chrono > 295.0f & chrono < 296.0f & textMedicament.enabled == true)
{
//diminuer jauge de vie
healthBar.Heal(40);
textMedicament.enabled = false;
textTemperature.enabled = true;
}
if (chrono > 325.0f & chrono < 326.0f & textTemperature.enabled == true)
{
//diminuer jauge de vie
healthBar.Heal(20);
textTemperature.enabled = false;
textReanimation.enabled = true;
}
if (chrono > 360.0f & textReanimation.enabled == true)
{
healthBar.Heal(0);
//mort du patient car jauge de vie =0
}
......@@ -101,7 +114,7 @@ public class ScreenP2Controller : MonoBehaviour
//Troisième série de tâches
if (chrono > 360.0f & chrono < 361.0f)
{
//Diminuer jauge de vie
healthBar.Heal(50);
homme.GetComponent<MeshRenderer>().material.color = Color.red;
textNourriture.enabled = true;
}
......
......@@ -19,6 +19,7 @@ public class IsOnContactPatient3 : MonoBehaviour
public Text textToilette;
public Text textPansement;
public Healthbar_3 healthBar;
public void OnTriggerStay(Collider other)
{
......@@ -29,7 +30,7 @@ public class IsOnContactPatient3 : MonoBehaviour
if (chronoTemperature >= 5.0f)
{
textTemperature.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -40,7 +41,7 @@ public class IsOnContactPatient3 : MonoBehaviour
if (chronoTension >= 5.0f)
{
textTension.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -51,7 +52,7 @@ public class IsOnContactPatient3 : MonoBehaviour
if (chronoNourriture >= 5.0f)
{
textNourriture.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -62,7 +63,7 @@ public class IsOnContactPatient3 : MonoBehaviour
if (chronoMedicament >= 5.0f)
{
textMedicament.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -73,7 +74,7 @@ public class IsOnContactPatient3 : MonoBehaviour
if (chronoToilette >= 5.0f)
{
textToilette.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -84,7 +85,7 @@ public class IsOnContactPatient3 : MonoBehaviour
if (chronoPansement >= 5.0f)
{
textPansement.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......
......@@ -14,22 +14,31 @@ public class ScreenP3Controller : MonoBehaviour
public Text textToilette;
public Text textTension;
public GameObject foodFemme;
public GameObject thermometreFemme;
public GameObject medicamentFemme;
public GameObject pansementFemme;
public GameObject servietteFemme;
public GameObject tensionFemme;
public float chrono = 0.0f;
public GameObject femme;
public Healthbar_3 healthBar;
public void UpdateTasksToDo()
{
//Première série de tâches
if(chrono > 180.0f & chrono < 181.0f)
{
//Diminuer jauge de vie
healthBar.Heal(60);
femme.GetComponent<MeshRenderer>().material.color = Color.red;
textToilette.enabled = true;
}
if(chrono > 220.0f & chrono < 221.0f)
{
//Diminuer jauge de vie
healthBar.Heal(30);
femme.GetComponent<MeshRenderer>().material.color = Color.red;
textNourriture.enabled = true;
}
......@@ -42,13 +51,13 @@ public class ScreenP3Controller : MonoBehaviour
//Deuxieme série de tâches
if(chrono > 265.0f & chrono < 366.0f)
{
//Diminuer jauge de vie
healthBar.Heal(60);
femme.GetComponent<MeshRenderer>().material.color = Color.red;
textTension.enabled = true;
}
if (chrono > 290.0f & chrono < 291.0f & textTension.enabled == true)
{
//Diminuer jauge de vie
healthBar.Heal(30);
textTension.enabled = false;
textTemperature.enabled = true;
}
......@@ -62,27 +71,28 @@ public class ScreenP3Controller : MonoBehaviour
//Troisième série de tâches
if (chrono > 300.0f & chrono < 301.0f)
{
//Diminuer jauge de vie
healthBar.Heal(75);
femme.GetComponent<MeshRenderer>().material.color = Color.red;
textPansement.enabled = true;
}
if(chrono > 330.0f & chrono < 331.0f & textPansement.enabled == true)
{
//Diminuer jauge de vie
healthBar.Heal(50);
textPansement.enabled = false;
textMedicament.enabled = true;
}
if (chrono > 360.0f & chrono < 361.0f & textMedicament.enabled == true)
{
//Diminuer jauge de vie
healthBar.Heal(25);
textMedicament.enabled = false;
textTemperature.enabled = true;
}
if (chrono > 390.0f & textTemperature.enabled == true)
{
healthBar.Heal(0);
//Mort du patient car jauge de vie nulle
}
}
......
......@@ -17,6 +17,8 @@ public class IsOnContactPatient4 : MonoBehaviour
public Text textReanimation;
public Text textTension;
public Healthbar_4 healthBar;
public void OnTriggerStay(Collider other)
{
if (other.gameObject.name == "Thermometre_Enfant")
......@@ -26,7 +28,7 @@ public class IsOnContactPatient4 : MonoBehaviour
if (chronoTemperature >= 5.0f)
{
textTemperature.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -37,7 +39,7 @@ public class IsOnContactPatient4 : MonoBehaviour
if (chronoPerfusion >= 5.0f)
{
textPerfusion.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -48,7 +50,7 @@ public class IsOnContactPatient4 : MonoBehaviour
if (chronoEau >= 5.0f)
{
textEau.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -59,7 +61,7 @@ public class IsOnContactPatient4 : MonoBehaviour
if (chronoReanimation >= 5.0f)
{
textReanimation.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......@@ -71,7 +73,7 @@ public class IsOnContactPatient4 : MonoBehaviour
if (chronoTension >= 5.0f)
{
textTension.enabled = false;
//augmenter jauge de vie
healthBar.Heal(100);
gameObject.GetComponent<MeshRenderer>().material.color = Color.green;
}
}
......
......@@ -22,12 +22,14 @@ public class ScreenP4Controller : MonoBehaviour
public float chrono = 0.0f;
public GameObject enfant;
public Healthbar_4 healthBar;
public void UpdateTasksToDo()
{
//Première série de tâches
if(chrono > 105.0f & chrono < 106.0f)
{
//Diminuer jauge de vie
healthBar.Heal(75);
enfant.GetComponent<Renderer>().material.color = Color.red;
tensionEnfant.GetComponent<Renderer>().material.color = Color.red;
textTension.enabled = true;
......@@ -35,20 +37,21 @@ public class ScreenP4Controller : MonoBehaviour
}
if (chrono > 140.0f & chrono < 141.0f & textTension.enabled == true)
{
//Diminuer jauge de vie
healthBar.Heal(50);
textTension.enabled = false;
textEau.enabled = true;
}
if (chrono > 175.0f & chrono < 176.0f & textEau.enabled == true)
{
//Diminuer jauge de vie
healthBar.Heal(25);
textEau.enabled = false;
textReanimation.enabled = true;
}
if (chrono > 200.0f & textReanimation.enabled == true)
{
healthBar.Heal(0);
//Mort du patient car jauge de vie nulle
}
......@@ -60,34 +63,35 @@ public class ScreenP4Controller : MonoBehaviour
//Deuxième série de tâches
if (chrono > 180.0f & chrono < 181.0f)
{
//Diminuer jauge de vie
healthBar.Heal(80);
enfant.GetComponent<MeshRenderer>().material.color = Color.red;
textEau.enabled = true;
}
if (chrono > 210.0f & chrono < 211.0f & textEau.enabled == true)
{
//Diminuer jauge de vie
healthBar.Heal(60);
textEau.enabled = false;
textTension.enabled = true;
}
if (chrono > 235.0f & chrono < 236.0f & textTension.enabled == true)
{
//Diminuer jauge de vie
healthBar.Heal(40);
textTension.enabled = false;
textTemperature.enabled = true;
}
if (chrono > 265.0f & chrono < 266.0f & textTemperature.enabled == true)
{
//Diminuer jauge de vie
healthBar.Heal(20);
textTemperature.enabled = false;
textPerfusion.enabled = true;
}
if (chrono > 290.0f & chrono < 291.0f & textPerfusion.enabled == true)
{
healthBar.Heal(0);
//Mort du patient car jauge de vie nulle
}
......@@ -100,27 +104,28 @@ public class ScreenP4Controller : MonoBehaviour
//Troisème série de tâches
if (chrono > 335.0f & chrono < 336.0f)
{
//Diminuer jauge de vie
healthBar.Heal(75);
enfant.GetComponent<MeshRenderer>().material.color = Color.red;
textTemperature.enabled = true;
}
if (chrono > 365.0f & chrono < 366.0f & textTemperature.enabled == true)
{
//Diminuer jauge de vie
healthBar.Heal(50);
textTemperature.enabled = false;
textPerfusion.enabled = true;
}
if (chrono > 395.0f & chrono < 396.0f & textPerfusion.enabled == true)
{
//Diminuer jauge de vie
healthBar.Heal(25);
textPerfusion.enabled = false;
textTension.enabled = true;
}
if (chrono > 420.0f & chrono < 421.0f & textTension.enabled == true)
{
healthBar.Heal(0);
//Mort du patient car jauge de vie nulle
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment