Ejemplo n.º 1
0
    private void SetCreatureData(CreatureIcon selectIcon, PvPCreatureInfo info)
    {
        DATA_CREATURE_NEWVER creatureTable = CDATA_CREATURE_NEWVER.Get(info.enID);

        int level = info.Level;

        CCreatureAbility creatureStat = BattleRule.CreatureAbilityUI(
            creatureTable,
            BattleRule.AddCreatureStatAbility(level, info.forceCount, creatureTable),
            BattleRule.PvPCreatureItemAbility(info.items));

        CCreatureAbilityUI.SetValues(creatureStat, _statValueTitle);

        CreateItemIcon(info.items);

        _passiveSkill = creatureTable.m_PassiveSkill_0;
        _skill0       = creatureTable.m_Skill_0;
        _activeSkill  = creatureTable.m_Skill_1;

        SetSkillInfo();

        foreach (CreatureIcon icon in _creatureIconList)
        {
            icon.SetActiveSelect(false);
        }

        selectIcon.SetActiveSelect(true);
    }
Ejemplo n.º 2
0
    private void CreateCreatureIcon(PvPCreaturesData creatureInfos)
    {
        ClearCreatureIcon();

        for (int i = 0; i < creatureInfos.Count; i++)
        {
            PvPCreatureInfo info = creatureInfos[i];

            CreatureIcon icon  = UIResourceMgr.CreatePrefab <CreatureIcon>(BUNDLELIST.PREFABS_UI_COMMON, _creatureIconTransforms[i], "CreatureIcon");
            int          Level = info.Level;
            icon.SetIcon(Level, info.forceCount, info.awake, CDATA_CREATURE_NEWVER.Get(info.enID), enCreatureIcon_Type.PvpDetail);
            icon.CreatureKey = info.key;
            icon.RemoveDragScrollView();
            UIEventListener.Get(icon.gameObject).onClick = OnClickIcon;

            _creatureIconList.Add(icon);
        }
    }