Esempio n. 1
0
 public void InitDataBase(SuitDataBase db)
 {
     m_suitDataBase = db;
     if (db != null)
     {
         m_suitID = db.base_id;
         m_label_tipssuitname.text = db.name;
         m_label_tipsdes.text      = db.desc;
         m_label_getwaydes.text    = db.activeWay;
         ShowAttr();
         SuitDataManager dm = DataManager.Manager <SuitDataManager>();
         SuitState       st = dm.GetSuitState(m_suitID);
         FashionTipsType ft = FashionTipsType.ShowBuy;
         if (st == SuitState.Show)
         {
             ft = FashionTipsType.None;
         }
         else if (st == SuitState.Equip)
         {
             ft = FashionTipsType.ShowUnLoad;
         }
         else if (st == SuitState.HasBuy)
         {
             ft = FashionTipsType.ShowEquip;
         }
         else if (st == SuitState.NoEffect)
         {
             ft = FashionTipsType.ShowAddTime;
         }
         else if (st == SuitState.Active)
         {
             ft = FashionTipsType.None;
         }
         else
         {
             ft = FashionTipsType.ShowBuy;
         }
         ShowBtn(ft);
     }
 }
Esempio n. 2
0
 void ShowBtn(FashionTipsType type)
 {
     if (type == FashionTipsType.ShowBuy)
     {
         m_btn_AddTime.gameObject.SetActive(false);
         m_btn_unload.gameObject.SetActive(false);
         m_btn_Equip.gameObject.SetActive(false);
         m_btn_buy.gameObject.SetActive(true);
     }
     else if (type == FashionTipsType.ShowEquip)
     {
         m_btn_AddTime.gameObject.SetActive(true);
         m_btn_unload.gameObject.SetActive(false);
         m_btn_Equip.gameObject.SetActive(true);
         m_btn_buy.gameObject.SetActive(false);
     }
     else if (type == FashionTipsType.ShowUnLoad)
     {
         m_btn_AddTime.gameObject.SetActive(true);
         m_btn_unload.gameObject.SetActive(true);
         m_btn_Equip.gameObject.SetActive(false);
         m_btn_buy.gameObject.SetActive(false);
     }
     else if (type == FashionTipsType.None)
     {
         m_btn_AddTime.gameObject.SetActive(false);
         m_btn_unload.gameObject.SetActive(false);
         m_btn_Equip.gameObject.SetActive(false);
         m_btn_buy.gameObject.SetActive(false);
     }
     else if (type == FashionTipsType.ShowAddTime)
     {
         m_btn_AddTime.gameObject.SetActive(true);
         m_btn_unload.gameObject.SetActive(false);
         m_btn_Equip.gameObject.SetActive(false);
         m_btn_buy.gameObject.SetActive(false);
     }
 }