void CreateEnemyPanel() { EnemyPanel = Instantiate(EnemyPanel) as GameObject; stats = EnemyPanel.GetComponent <EnemyPanelStats>(); stats.EnemyName.text = enemy.theName; stats.EnemyHP.text = "" + enemy.curHP + "/" + enemy.baseHP; EnemyPanel.transform.SetParent(EnemyPanelSpacer, false); }
//Create enemys health bar etc. void CreateEnemyPanel() { EnemyPanel = Instantiate(EnemyPanel) as GameObject; stats = EnemyPanel.GetComponent <EnemyPanelStats>(); stats.EnemyName.text = enemy.theName; stats.EnemyHP.text = enemy.curHP + "/" + enemy.baseHP; stats.EnemyMP.text = enemy.curMP + "/" + enemy.baseMP; ProgressBar = stats.ProgressBar; HealthBar = stats.HealthBar; ManaBar = stats.ManaBar; EnemyPanel.transform.SetParent(EPSpacer, false); }