Example #1
0
 void Awake()
 {
     m_shootCooldown = 0f;
     m_sight         = GetComponent <enemySight> ();
     m_health        = GetComponent <enemyHealth> ();
     m_player        = FindObjectOfType <playerController> ().gameObject;
 }
Example #2
0
 protected override void Awakes()
 {
     sight           = GetComponentInChildren <enemySight>();
     moves           = GetComponent <Moves>();
     jump            = GetComponent <Jump>();
     chouhencooldown = 0;
 }
 // Use this for initialization
 void Awake()
 {
     anim = GetComponent<Animator>();
     alerted = false;
     health = 10;
     wayPoint = 0;
     patrolTimer = 0;
     EnemySight = GetComponent<enemySight> ();
     navAgent = GetComponent<NavMeshAgent> ();
     player = GameObject.FindGameObjectWithTag ("Player").transform;
     lastPlayerSighting = GameObject.FindGameObjectWithTag ("GameController").GetComponent<LastPlayerSighting> ();
 }
Example #4
0
    // Use this for initialization

    protected virtual void Awake()
    {
        m_healthController = GetComponent <enemyHealth> ();
        m_sightController  = GetComponent <enemySight> ();
        m_shootController  = GetComponent <enemyShoot> ();

        player       = GameObject.FindGameObjectWithTag("Player");
        anim         = GetComponent <Animator>();
        audios       = GetComponents <AudioSource> ();
        detectSource = audios [0];
        hitSource    = audios [1];
        if (audios.Length == 3)
        {
            shootsound = audios [2];
        }
    }
Example #5
0
 void Awake()
 {
     MySight = GetComponent <enemySight> ();
     Player  = GameObject.FindGameObjectWithTag("Player");
 }
Example #6
0
	void Awake(){
		MySight = GetComponent<enemySight> ();
		Player = GameObject.FindGameObjectWithTag ("Player");
	}