Exemplo n.º 1
0
    void OnItemClick(GameObject go)
    {
        LeftSkillItem item = go.GetComponent <LeftSkillItem>();

        if (item == null)
        {
            return;
        }
        m_uWillSetSkillID = item.ItemDataBase.wdID;
        CurDataBase       = item.ItemDataBase;
        if (!skilldataManager.IsSettingPanel)
        {
            SkillDatabase bseDataBase = GameTableManager.Instance.GetTableItem <SkillDatabase>(CurDataBase.wdID, (int)1);
            if (MainPlayerHelper.GetPlayerLevel() < bseDataBase.dwNeedLevel)
            {
                item.SetItemState(LeftLearnSkillItemState.LockSelect);
            }
            else
            {
                item.SetItemState(LeftLearnSkillItemState.OpenNotSetAndSelect);
            }

            return;
        }
        if (!BRightChange && !BLeftChange)
        {
            BRightChange = true;
        }
        if (BRightChange)
        {
            ResetLeftItem();
            if (item.ItemState == LeftLearnSkillItemState.OpenNotSetAndNotSelect)
            {
                item.SetItemState(LeftLearnSkillItemState.OpenNotSetAndSelect);
            }
            else
            {
                BRightChange      = false;
                m_uWillSetSkillID = 0;
            }
        }
        if (BLeftChange)
        {
            if (item.ItemState == LeftLearnSkillItemState.OpenNotSetAndCanSet)
            {
                BLeftChange = false;
                SendSetSkillMessage();
            }
        }
        #region dragcode
        //LearnSkillItem item = go.GetComponent<LearnSkillItem>();
        //if ( item == null )
        //    return;
        #endregion
    }
Exemplo n.º 2
0
    void ShowShengjiItemState()
    {
        List <uint> keyList = m_dicLeftItem.Keys.ToList <uint>();

        for (int i = 0; i < keyList.Count; i++)
        {
            uint          keyID   = keyList[i];
            LeftSkillItem item    = m_dicLeftItem[keyID];
            SkillDatabase skillDb = GameTableManager.Instance.GetTableItem <SkillDatabase>(item.ItemDataBase.wdID, 1);
            if (skillDb == null)
            {
                return;
            }
            if (MainPlayerHelper.GetPlayerLevel() < skillDb.dwNeedLevel)
            {//未解锁
                if (i == 0)
                {
                    item.SetItemState(LeftLearnSkillItemState.LockSelect);
                }
                else
                {
                    item.SetItemState(LeftLearnSkillItemState.Lock);
                }
            }
            else
            {
                if (i == 0)
                {
                    item.SetItemState(LeftLearnSkillItemState.OpenNotSetAndSelect);
                }
                else
                {
                    item.SetItemState(LeftLearnSkillItemState.OpenNotSetAndNotSelect);
                }
            }
        }
    }
Exemplo n.º 3
0
    void OnShowLeftChange()
    {
        var iter = m_dicLeftItem.GetEnumerator();

        while (iter.MoveNext())
        {
            var           dic  = iter.Current;
            LeftSkillItem item = dic.Value;
            if (m_bLeftChange)
            {
                if (item.ItemState == LeftLearnSkillItemState.OpenNotSetAndNotSelect || item.ItemState == LeftLearnSkillItemState.OpenNotSetAndSelect)
                {
                    item.SetItemState(LeftLearnSkillItemState.OpenNotSetAndCanSet);
                }
            }
            else
            {
                item.ResetState();
            }
        }
    }