public void RemoveOwner(Selectable.Owner _own) { if (NativeMethods.RemoveOwner_s(m_GoalPtr, _own.gameObject.GetInstanceID())) { GoalManager.Instance.StopCoroutine(this.UpdateTargetLocationAndRepath()); GoalManager.Instance.RemoveGoal(this); if (m_TargetOwnerComp != null) { m_TargetOwnerComp.RemoveOnDeathCall(TargetDied); } m_GoalPtr = (IntPtr)0; } RemoveOnTargetDeathCall(_own.TargetDeathFunction()); }
public void AddOwner(Selectable.Owner _own) { NativeMethods.AddOwner_s(m_GoalPtr, _own.gameObject.GetInstanceID()); AddOnTargetDeathCall(_own.TargetDeathFunction()); }