예제 #1
0
    void OnGridClick(PetLineUpPos pos, int index, uint petID)
    {
        if (pos == PetLineUpPos.Down)
        {
            m_uDownSelectPetID = petID;
            var iter = m_upDic.GetEnumerator();
            while (iter.MoveNext())
            {
                var item = iter.Current;

                item.Value.SetFlag(true);
            }
            iter = m_downDic.GetEnumerator();
            while (iter.MoveNext())
            {
                var item = iter.Current;
                if (index == item.Key)
                {
                    item.Value.SetHighLight(true);
                }
                else
                {
                    item.Value.SetHighLight(false);
                }
            }
        }
        if (pos == PetLineUpPos.Up)
        {
            if (m_uDownSelectPetID == 0)
            {
                m_PetData.RemovelineUp(petID);
            }
            else
            {
                m_PetData.ReplaceLineUP(m_uDownSelectPetID, petID);
            }
        }
    }
예제 #2
0
 public void InitPos(PetLineUpPos pos, int index)
 {
     m_pos   = pos;
     m_index = index;
 }