예제 #1
0
    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);
    }
예제 #2
0
    //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);
    }