public void ResetNumberProjectilesCibles4() { timeLeft_Cible4 = timer_cible4 * 60; Angry_Cible4.SetActive(false); Number_Projectile_Cible4 = Random.Range(Minimum_Projectile_Range, Maximum_Projectile_Range); Debug.Log("cible1 reset: " + Number_Projectile_Cible4); }
// Update is called once per frame void Update() { if (Sarbacane_East.activeSelf || Sarbacane_North_East.activeSelf || Sarbacane_North_West.activeSelf || Sarbacane_West.activeSelf) { UI_Man.CanScoring(); } if (Number_Projectile_Cible1 <= 0) { Angry_Cible1.SetActive(true); } if (Number_Projectile_Cible2 <= 0) { Angry_Cible2.SetActive(true); } if (Number_Projectile_Cible3 <= 0) { Angry_Cible3.SetActive(true); } if (Number_Projectile_Cible4 <= 0) { Angry_Cible4.SetActive(true); } }
// Update is called once per frame void Update() { if (Number_Projectile_Cible1 <= 0) { if (!tuto03_Activated) { Tuto03.SetActive(true); tuto03_Activated = true; } //my_SM.Repere_Cible(); Angry_Cible1.SetActive(true); timeLeft_Cible1--; if (timeLeft_Cible1 <= 0f && !Cible1_Returned) { UI_Man.AddBonusScore(); ResetNumberProjectilesCibles1(); } else if (timeLeft_Cible1 >= 0f && Input.GetMouseButtonDown(0)) { Cible1_Returned = true; BD_Cible1.SetActive(true); UI_Man.DicreaseTime(); Sarbacane_East.SetActive(false); timeLeft_Cible1 = -0.1f; Tuto03.SetActive(false); } } if (Number_Projectile_Cible2 <= 0) { if (!tuto03_Activated) { Tuto03.SetActive(true); tuto03_Activated = true; } //my_SM.Repere_Cible(); Angry_Cible2.SetActive(true); timeLeft_Cible2--; if (timeLeft_Cible2 <= 0f && !Cible2_Returned) { UI_Man.AddBonusScore(); ResetNumberProjectilesCibles2(); } else if (timeLeft_Cible2 >= 0f && Input.GetMouseButtonDown(0)) { Cible2_Returned = true; BD_Cible2.SetActive(true); UI_Man.DicreaseTime(); Sarbacane_North_East.SetActive(false); timeLeft_Cible2 = -0.1f; Tuto03.SetActive(false); } } if (Number_Projectile_Cible3 <= 0) { if (!tuto03_Activated) { Tuto03.SetActive(true); tuto03_Activated = true; } //my_SM.Repere_Cible(); Angry_Cible3.SetActive(true); timeLeft_Cible3--; if (timeLeft_Cible3 <= 0f && !Cible3_Returned) { UI_Man.AddBonusScore(); ResetNumberProjectilesCibles3(); } else if (timeLeft_Cible3 >= 0f && Input.GetMouseButtonDown(0)) { Cible3_Returned = true; BD_Cible3.SetActive(true); UI_Man.DicreaseTime(); Sarbacane_North_West.SetActive(false); timeLeft_Cible3 = -0.1f; Tuto03.SetActive(false); } } if (Number_Projectile_Cible4 <= 0) { if (!tuto03_Activated) { Tuto03.SetActive(true); tuto03_Activated = true; } //my_SM.Repere_Cible(); Angry_Cible4.SetActive(true); timeLeft_Cible4--; if (timeLeft_Cible4 <= 0f && !Cible4_Returned) { UI_Man.AddBonusScore(); ResetNumberProjectilesCibles4(); } else if (timeLeft_Cible4 >= 0f && Input.GetMouseButtonDown(0)) { Cible4_Returned = true; BD_Cible4.SetActive(true); UI_Man.DicreaseTime(); Sarbacane_West.SetActive(false); timeLeft_Cible4 = -0.1f; Tuto03.SetActive(false); } } if (BD_Cible1.activeSelf && BD_Cible2.activeSelf && BD_Cible3.activeSelf && BD_Cible4.activeSelf) { UI_Man.Timeout(); } }