// Use this for initialization void Start() { //Initializes and displays all the GUI stuff with the needed information enemyHp = GameObject.FindWithTag("EnemyHp").GetComponent<Slider>(); xpBar = GameObject.FindWithTag("XpBar").GetComponent<Slider>(); clickDmg = GameObject.FindWithTag("ClickDamage").GetComponent<RectTransform>(); guildDmg = GameObject.FindWithTag("GuildieDamage").GetComponent<RectTransform>(); enemyHP = GameObject.FindWithTag ("EnemyHealth").GetComponent<RectTransform> (); numOfGuildies = GameObject.FindWithTag ("GuildMembers").GetComponent<RectTransform> (); //numberOfGuildies = GameObject.GetComponent<Text>; //Creates enemy and sets up all their attributes enemy = Instantiate(enemyPrefab); enemy.setPlayerClickDamage(player.getPlayerDamage()); enemy.setHealth(level); enemy.setXP(level); // enemy.boss(level); // Guildie g = new Guildie(); // guildies.Add(g); enemyHp.maxValue = enemy.getHealth (); }