예제 #1
0
    void Awake()
    {
        enemy  = this.gameObject.transform;
        player = GameObject.FindGameObjectWithTag("Player").transform;

        gunParticles       = GetComponent <ParticleSystem>();
        timeBetweenBullets = Random.Range(.5f, 1f);
        gunAudio           = GetComponent <AudioSource>();
        gunLight           = GetComponent <Light>();
        enemyAttack        = GetComponentInParent <EnemyAttackGun>();
        enemyMovement      = GetComponentInParent <EnemyMovmentSlow>();
    }
예제 #2
0
    void Awake()
    {
        patrol                = GetComponent <Patrol>();
        enemy                 = this.gameObject.transform;
        enemyMovement         = GetComponent <EnemyMovmentSlow>();
        agent                 = GetComponent <UnityEngine.AI.NavMeshAgent>();
        agent.autoBraking     = false;
        player                = GameObject.FindGameObjectWithTag("Player").transform;
        enemyMovement.enabled = false;
        enemyHealth           = GetComponent <EnemyHealthSlowGun>();

        GoToNextPoint();
    }