void Start() { player = GameObject.FindWithTag ("Player").transform; pHealth = player.GetComponent<PlayerHealth> (); eHealth = GetComponent<EnemyHealth> (); Rigidbody = GetComponent<Rigidbody> (); }
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> (); }