Beispiel #1
0
    void AddSkillCell(SkillData skillData, int index)
    {
        GameObject o = NGUITools.AddChild(skillGrid.gameObject, skillCellPrefab);

        o.name = index.ToString() + " " + skillData.skillID;

        UISkillCell skillcell = o.GetComponent <UISkillCell>();

        skillcell.SetData(skillData, this);
    }
Beispiel #2
0
    void UpdateAllSkillState()
    {
        foreach (Transform t in skillGrid.transform)
        {
            UISkillCell skillcell = t.GetComponent <UISkillCell>();

            int skillRank = PlayerInfo.Instance.GetSkillLevel(skillcell.skillData.skillID);
            skillcell.Unlocked = (skillRank == 0);
            skillcell.UpdateFlagState();
        }
    }