Esempio n. 1
1
 void Start()
 {
     player = GameObject.FindWithTag ("Player").transform;
     pHealth = player.GetComponent<PlayerHealth> ();
     eHealth = GetComponent<EnemyHealth> ();
     Rigidbody = GetComponent<Rigidbody> ();
 }
Esempio n. 2
0
 void Awake()
 {
     player = GameObject.FindGameObjectWithTag ("Player");
     pHealth = player.GetComponent<PlayerHealth> ();
     eHealth = GetComponent<EnemyHealth> ();
     eMove = GetComponent<EnemyMovement> ();
 }
		void Awake ()
		{
			PTank = GameObject.Find("PlayerTank(Clone)").transform;
			ETank = GameObject.Find("EnemyTank_Hard(Clone)").transform;
			pHealth = PTank.GetComponent<PlayerHealth> ();
			eHealth = ETank.GetComponent<EnemyHealth> ();
			eMove = ETank.GetComponent<EnemyMovement> ();
		}