Beispiel #1
0
 /*void OnClickGemItem1(int nItemID, ItemSlotLogic.SLOT_TYPE eItemType, string strSlotName)
  * {
  *  if (m_NewPlayerGuide_Step == 1)
  *  {
  *      NewPlayerGuide(2);
  *  }
  *  if (m_NewPlayerGuide_Step == 4)
  *  {
  *      NewPlayerGuide(5);
  *  }
  *  int ItemIndex = (m_CurGemItemPage - 1) * (int)CONSTVALUE.GEM_ITEM_NUM + 0;
  *  if (ItemIndex >= 0 && ItemIndex < m_GemItemList.Count)
  *  {
  *      ClearGemItemChoose();
  *      m_CurGemItem = m_GemItemList[ItemIndex];
  *      m_GemItem[0].ItemSlotChoose();
  *      ShowChooseGemInfo(m_CurGemItem);
  *  }
  * }
  *
  * void OnClickGemItem2(int nItemID, ItemSlotLogic.SLOT_TYPE eItemType, string strSlotName)
  * {
  *  int ItemIndex = (m_CurGemItemPage - 1) * (int)CONSTVALUE.GEM_ITEM_NUM + 1;
  *  if (ItemIndex >= 0 && ItemIndex < m_GemItemList.Count)
  *  {
  *      ClearGemItemChoose();
  *      m_CurGemItem = m_GemItemList[ItemIndex];
  *      m_GemItem[1].ItemSlotChoose();
  *      ShowChooseGemInfo(m_CurGemItem);
  *  }
  * }
  *
  * void OnClickGemItem3(int nItemID, ItemSlotLogic.SLOT_TYPE eItemType, string strSlotName)
  * {
  *  int ItemIndex = (m_CurGemItemPage - 1) * (int)CONSTVALUE.GEM_ITEM_NUM + 2;
  *  if (ItemIndex >= 0 && ItemIndex < m_GemItemList.Count)
  *  {
  *      ClearGemItemChoose();
  *      m_CurGemItem = m_GemItemList[ItemIndex];
  *      m_GemItem[2].ItemSlotChoose();
  *      ShowChooseGemInfo(m_CurGemItem);
  *  }
  * }
  *
  * void OnClickGemItem4(int nItemID, ItemSlotLogic.SLOT_TYPE eItemType, string strSlotName)
  * {
  *  int ItemIndex = (m_CurGemItemPage - 1) * (int)CONSTVALUE.GEM_ITEM_NUM + 3;
  *  if (ItemIndex >= 0 && ItemIndex < m_GemItemList.Count)
  *  {
  *      ClearGemItemChoose();
  *      m_CurGemItem = m_GemItemList[ItemIndex];
  *      m_GemItem[3].ItemSlotChoose();
  *      ShowChooseGemInfo(m_CurGemItem);
  *  }
  * }
  *
  * void OnClickGemItem5(int nItemID, ItemSlotLogic.SLOT_TYPE eItemType, string strSlotName)
  * {
  *  int ItemIndex = (m_CurGemItemPage - 1) * (int)CONSTVALUE.GEM_ITEM_NUM + 4;
  *  if (ItemIndex >= 0 && ItemIndex < m_GemItemList.Count)
  *  {
  *      ClearGemItemChoose();
  *      m_CurGemItem = m_GemItemList[ItemIndex];
  *      m_GemItem[4].ItemSlotChoose();
  *      ShowChooseGemInfo(m_CurGemItem);
  *  }
  * }
  *
  * void OnClickGemItem6(int nItemID, ItemSlotLogic.SLOT_TYPE eItemType, string strSlotName)
  * {
  *  int ItemIndex = (m_CurGemItemPage - 1) * (int)CONSTVALUE.GEM_ITEM_NUM + 5;
  *  if (ItemIndex >= 0 && ItemIndex < m_GemItemList.Count)
  *  {
  *      ClearGemItemChoose();
  *      m_CurGemItem = m_GemItemList[ItemIndex];
  *      m_GemItem[5].ItemSlotChoose();
  *      ShowChooseGemInfo(m_CurGemItem);
  *  }
  * }
  *
  * void OnClickGemItem7(int nItemID, ItemSlotLogic.SLOT_TYPE eItemType, string strSlotName)
  * {
  *  int ItemIndex = (m_CurGemItemPage - 1) * (int)CONSTVALUE.GEM_ITEM_NUM + 6;
  *  if (ItemIndex >= 0 && ItemIndex < m_GemItemList.Count)
  *  {
  *      ClearGemItemChoose();
  *      m_CurGemItem = m_GemItemList[ItemIndex];
  *      m_GemItem[6].ItemSlotChoose();
  *      ShowChooseGemInfo(m_CurGemItem);
  *  }
  * }
  *
  * void OnClickGemItem8(int nItemID, ItemSlotLogic.SLOT_TYPE eItemType, string strSlotName)
  * {
  *  int ItemIndex = (m_CurGemItemPage - 1) * (int)CONSTVALUE.GEM_ITEM_NUM + 7;
  *  if (ItemIndex >= 0 && ItemIndex < m_GemItemList.Count)
  *  {
  *      ClearGemItemChoose();
  *      m_CurGemItem = m_GemItemList[ItemIndex];
  *      m_GemItem[7].ItemSlotChoose();
  *      ShowChooseGemInfo(m_CurGemItem);
  *  }
  * }
  */
 void ClearGemItemChoose()
 {
     /*for (int i = 0; i < (int)CONSTVALUE.GEM_ITEM_NUM; i++)
      * {
      *  m_GemItem[i].ItemSlotChooseCancel();
      * }*/
     for (int nIndex = 0; nIndex < GameItemContainer.MAXSIZE_BACKPACK; ++nIndex)
     {
         Transform ItemTrans = m_GemListGrid.transform.FindChild((nIndex + 1000).ToString());
         if (ItemTrans != null && ItemTrans.gameObject && ItemTrans.gameObject.activeInHierarchy)
         {
             Transform child = ItemTrans.FindChild("ItemSlot");
             if (child != null)
             {
                 ItemSlotLogic tempIS = child.gameObject.GetComponent <ItemSlotLogic>();
                 if (null != tempIS)
                 {
                     tempIS.ItemSlotChooseCancel();
                 }
             }
         }
     }
     ClearChooseGemInfo();
     m_CurGemItem = null;
 }