/// <summary> /// React to attacks and notify other AI about it. /// </summary> public void OnHit(Hit hit) { _situation.IsAlerted = true; if (hit.Attacker != null && _situation.Threat == null) { var threat = hit.Attacker.GetComponent <Actor>(); if (threat != null && threat.Side != _actor.Side) { _situation.ReadEnemyState(threat); } } AIUtil.NotifyFriends(_actor, "OnFriendHit", _actor); }