private void Start() { m_rigidbody = GetComponent <Rigidbody>(); fieldOfView = GetComponent <FieldOfView>(); fieldOfView.SetOwnerRef(this); detection = GetComponentInChildren <Detection>(); m_animator = GetComponentInChildren <Animator>(); }
private void Start() { diverRef = FindObjectOfType <Diver>(); pathFinder = GetComponent <PathFinder>(); fieldOfView = GetComponent <FieldOfView>(); m_animator = GetComponentInChildren <Animator>(); fieldOfView.SetOwnerRef(this); originalPosition = transform.position; StartCoroutine(ProcessBehavior()); }