|
|
@ -32,7 +32,7 @@ public class Searchlight : MonoBehaviour |
|
|
|
{ |
|
|
|
foreach (Searchlight sl in instants) |
|
|
|
{ |
|
|
|
if (sl.isTriggering) |
|
|
|
if (sl.isActiveAndEnabled && sl.isTriggering) |
|
|
|
return true; |
|
|
|
} |
|
|
|
return false; |
|
|
@ -43,9 +43,9 @@ public class Searchlight : MonoBehaviour |
|
|
|
NotificationServer.register("statechange Searchlight safe", stateSafe); |
|
|
|
NotificationServer.register("statechange Searchlight returning", stateReturning); |
|
|
|
NotificationServer.register("spotted boat", spottedBoat); |
|
|
|
NotificationServer.register("restart scene", stateSafe); |
|
|
|
if (!instants.Contains(this)) |
|
|
|
instants.Add(this); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void OnTriggerEnter(Collider other) |
|
|
@ -80,6 +80,7 @@ public class Searchlight : MonoBehaviour |
|
|
|
public void stateSafe() |
|
|
|
{ |
|
|
|
state = SearchState.Spline; |
|
|
|
isTriggering = false; |
|
|
|
LeanTween.cancel(chaseID, false); |
|
|
|
} |
|
|
|
|
|
|
|