/// <summary> /// Overrides the inherited method to check the situation during which the player was spotted /// and stores the result of this in the _targetRelationship variable. /// Calls the inherited method in the end. /// </summary> /// <param name="target"></param> protected override void OnStatebrainChangedTarget(MonoBehaviour target) { if (target != null) { if (_guardManager.AmountOfGuardsWithVision == 0 && !_guardManager.EnemyPresenceAwareness) { _targetRelationship = TargetRelationship.FIRST_SPOTTER_ON_PATROL; } else if (_guardManager.AmountOfGuardsWithVision == 0 && _guardManager.EnemyPresenceAwareness) { _targetRelationship = TargetRelationship.FIRST_SPOTTER_ON_ALERT; } else { _targetRelationship = TargetRelationship.DEFAULT; } } base.OnStatebrainChangedTarget(target); }
public void ResetTargetRelationship() { _targetRelationship = TargetRelationship.DEFAULT; Task.current.Complete(true); }