Beispiel #1
0
    void InitCommon(CharacterContainer character_container, float attack_next_time, GameObject hpBarPrefab, GameObject skillPrefab)
    {
        InitContainer(character_container);

        HPBar = (GameObject.Instantiate(hpBarPrefab) as GameObject).GetComponent <CharacterHPBar>();
        HPBar.transform.SetParent(BattleBase.Instance.HPBarCanvas.transform, false);
        HPBar.Init(this, IsTeam == false, Scale);

        SkillName = (GameObject.Instantiate(skillPrefab) as GameObject).GetComponent <CharacterSkill>();
        SkillName.transform.SetParent(BattleBase.Instance.CharacterSkillCanvas.transform, false);
        SkillName.Init(Character.transform, IsTeam);


        Skills = new List <BattleSkill>();
        Buffs  = new List <Buff>();

        Restart(attack_next_time);
    }