void Start() { player = GameObject.FindGameObjectWithTag("Player").transform; obstackleMask = LayerMask.GetMask("Wall", "Enemy", "Player"); walkableMask = LayerMask.GetMask("Wall", "Enemy"); curPos = this.transform.position; aIPath = this.GetComponent <AIPath>(); aIPath.maxSpeed = followPlayerSpeed; aIPath.endReachedDistance = attackRange; destinationSetter = this.GetComponent <AIDestinationSetter>(); destinationSetter.target = player; enemyAttack = this.GetComponent <EnemyAttack>(); StartCoroutine(Movement()); }
private void Start() { //player = GameObject.FindGameObjectWithTag("Player").transform; damage = GetComponent <EnemyAttack>(); // RearviewCameraBehaviour.RequestRearviewOn(); }