protected void OnFollowStart() { if (_aiDetectFriendBehaviour.GetTarget() != null) { //Debug.Log("Following..."); _navMeshAgent.SetDestination(_aiDetectFriendBehaviour.GetTarget().position); } }
protected void OnFollowStart() { if (_aiDetectFriendBehaviour.GetTarget() != null) { //Debug.Log("Following..."); if (!_isCollected) { _isCollected = true; GameManager._pigeonsCollected++; } _navMeshAgent.SetDestination(_aiDetectFriendBehaviour.GetTarget().position); } }
protected override void OnIdleEnd() { if (_aiDetectFriendBehaviour.GetTarget() == null) { _animator.SetBool("Idle", false); _animator.SetBool("Follow", false); _animator.SetBool("Patrol", true); EventManager.InvokeChangeStateEvent(new EventData(this.gameObject, true), EAIState.Patrol); } else { _animator.SetBool("Idle", false); _animator.SetBool("Follow", true); _animator.SetBool("Patrol", false); EventManager.InvokeChangeStateEvent(new EventData(this.gameObject, true), EAIState.Follow); } }