public virtual void Start() { if (hasNavigation) { navigation = GetComponent <NodeNavigation>(); navigation.currentNode = nodegroup._first; navigation.rigidbody = GetComponent <Rigidbody>(); } sight = GetComponent <Sight>(); sight.targetTransform = target; }
private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
/// <summary> /// Initializes the object used for single node navigation. /// </summary> private void InitializeNodeNavigation() { nodeNavigation = new NodeNavigation(allNodes); }
void RefreshPath() { NodeNavigation navigationObject = FindObjectOfType <NodeNavigation>(); navigationObject.reDrawPath(); }