Пример #1
0
    public virtual void OnTargetReached()
    {
        //End of path has been reached
        //If you want custom logic for when the AI has reached it's destination
        //add it here
        //You can also create a new script which inherits from this one
        //and override the function in that script
//		MyFinding finding = GetComponent<MyFinding> ();
//		if (lastChoosenTarget != -1) {
//						finding.ResearchDelete (lastPoses [lastChoosenTarget]);
//						lastChoosenTarget = -1;
//				}

        if (parent != null)
        {
            parent.OnReachedTarget();
        }
        lastTargetPos = Vector3.zero;
    }