Exemple #1
0
    //加载heroHP
    GameObject LoadHP(GameObject go, FightPlayerModel player)
    {
        GameObject hp = Instantiate(Resources.Load("Prefab/HpBar")) as GameObject;

        hp.transform.parent = HP;
        HpBar hpBar = hp.GetComponent <HpBar>();

        hpBar.SetTaget(go.transform.Find("headhp"));
        hpBar.refesh(player);
        return(hp);
    }