예제 #1
0
        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());
        }
예제 #2
0
 private void Start()
 {
     //player = GameObject.FindGameObjectWithTag("Player").transform;
     damage = GetComponent <EnemyAttack>();
     // RearviewCameraBehaviour.RequestRearviewOn();
 }