diff --git a/GGJ17/Assets/Script/Blocks/Building/Building_Barracks.cs b/GGJ17/Assets/Script/Blocks/Building/Building_Barracks.cs index 3014bdf..ba3804a 100644 --- a/GGJ17/Assets/Script/Blocks/Building/Building_Barracks.cs +++ b/GGJ17/Assets/Script/Blocks/Building/Building_Barracks.cs @@ -94,14 +94,9 @@ public IEnumerator Sonar() { if (!isAlerted) { - StartCoroutine(Engaging()); IsAlerted = true; + StartCoroutine(Engaging()); } - clearTicks = 0; - } - else if(++clearTicks == ticksToLeaveAlert) - { - IsAlerted = false; } yield return new WaitForSeconds(sonarPulseIntervall); } @@ -121,5 +116,6 @@ public IEnumerator Engaging() ousiaRay.enabled = false; } } + IsAlerted = false; } }