Esempio n. 1
0
 private void Awake()
 {
     enemySense    = GetComponent <EnemySightHearing>();
     shootLine     = GetComponent <LineRenderer>();
     bulletManager = bullet.GetComponent <BulletManager>();
     bShooting     = false;
 }
 private void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player");
     enemySense = GetComponentInParent<EnemySightHearing>();
     originalScale = transform.localScale;
     rotator = 0f;
     increasing = true;
 }
 private void Awake()
 {
     enemySense       = GetComponent <EnemySightHearing>();
     player           = GameObject.FindGameObjectWithTag("Player");
     shootLine        = GetComponent <LineRenderer>();
     bulletManager    = bullet.GetComponent <BulletManager>();
     crosshairManager = GetComponentInChildren <ShinonCrosshairManager>();
     bShooting        = false;
 }
 private void Awake()
 {
     enemySense       = GetComponent <EnemySightHearing>();
     pHealth          = player.GetComponent <PlayerHealth>();
     nav              = GetComponent <NavMeshAgent>();
     rb               = GetComponent <Rigidbody>();
     enemyAnim        = GetComponent <Animator>();
     patrolTimer      = 0f;
     distanceToPlayer = 0f;
 }
Esempio n. 5
0
    private void Awake()
    {
        enemyAnim = GetComponent <Animator>();
        nav       = GetComponent <NavMeshAgent>();

        pHealth    = player.GetComponent <PlayerHealth>();
        enemySight = GetComponent <EnemySightHearing>();



        enemyAnim.SetLayerWeight(1, 1f);
        enemyAnim.SetLayerWeight(2, 1f);

        ignoreAngle *= Mathf.Deg2Rad;
    }