Ejemplo n.º 1
0
 void Awake()
 {
     player = GameObject.FindGameObjectWithTag ("Player");
     pHealth = player.GetComponent<PlayerHealth> ();
     eHealth = GetComponent<EnemyHealth> ();
     eMove = GetComponent<EnemyMovement> ();
 }
Ejemplo n.º 2
0
		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> ();
		}
Ejemplo n.º 3
0
		public void Setup ()
		{
			PMove = Instance.GetComponent<PlayerMovement> ();
			PAttack = Instance.GetComponent<PlayerAttack> ();
			EMove = Instance.GetComponent<EnemyMovement> ();
			EAttack = Instance.GetComponent<EnemyAttack> ();
			CanvasGameObject = Instance.GetComponentInChildren<Canvas> ().gameObject;
		
			ColoredPlayerText = "<color=#" + ColorUtility.ToHtmlStringRGB (PlayerColor) + ">TANK " + "</color>";

			MeshRenderer[] renderers = Instance.GetComponentsInChildren<MeshRenderer> ();

			for (int i = 0; i < renderers.Length; i++)
			{
				renderers[i].material.color = PlayerColor;
			}
		}