Пример #1
0
    void generateHealthBar()
    {
        GameObject healthBar = Instantiate(healthBarPrefab) as GameObject;

        healthBarControls = healthBar.GetComponent <HealthBarController>();
        healthBarControls.SetHealthBarData(this.transform, healthPanelRect);
        healthBarControls.transform.SetParent(healthPanelRect, false);
    }