Ejemplo n.º 1
0
 void Start()
 {
     damage       = GetComponent <Damage>();
     spriteRend   = GetComponentInChildren <SpriteRenderer>();
     timer        = 0;
     bulletSpeed  = 15f;
     shootingRate = 1.5f;
     damage.AssignMaxHpAndAttack();
     playerUIimage = GameObject.FindGameObjectWithTag("puiImage2");
     playerUImain  = GameObject.FindGameObjectWithTag("pui2");
     playerUImain.GetComponentInChildren <Slider>().maxValue = damage.GetMaxHp();
     updateUI();
     playerUImain.GetComponentInChildren <Text>().text = "Enemy";
 }