void OnLostTarget(LossTargetEvent @event)
 {
     if (@event.target != player || @event.subject != gameObject)
     {
         return;
     }
     detected = false;
 }
Exemple #2
0
    void OnLostTarget(LossTargetEvent @event)
    {
        if (@event.target != player || @event.subject != gameObject)
        {
            return;
        }

        if (chasing)
        {
            // _light.color = colors[1];
            behavior.SetVariableValue("Detected", false);
            behavior.SetVariableValue("Spot Point", @event.spotPoint);
            chasing   = false;
            searching = true;
        }
        detected = false;
    }