示例#1
0
 void Awake()
 {
     m_shootCooldown = 0f;
     m_sight         = GetComponent <enemySight> ();
     m_health        = GetComponent <enemyHealth> ();
     m_player        = FindObjectOfType <playerController> ().gameObject;
 }
示例#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> ();
 }
示例#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];
        }
    }
示例#5
0
 void Awake()
 {
     MySight = GetComponent <enemySight> ();
     Player  = GameObject.FindGameObjectWithTag("Player");
 }
示例#6
0
	void Awake(){
		MySight = GetComponent<enemySight> ();
		Player = GameObject.FindGameObjectWithTag ("Player");
	}