Exemplo n.º 1
0
 /// <summary>
 /// 初始化星魂强化界面
 /// </summary>
 public void init(Card card, StarSoul starSoul, ButtonStoreStarSoul.ButtonStateType type)
 {
     this.card     = card;
     this.type     = type;
     this.starSoul = starSoul;
     initContent(card, starSoul, type);
 }
Exemplo n.º 2
0
 /* methods */
 /// <summary>
 /// 重新读取玩家身上的星魂
 /// </summary>
 public void reLoad(ArrayList _starSouls, ButtonStoreStarSoul.ButtonStateType intoType)
 {
     starSouls     = _starSouls;
     this.intoType = intoType;
     isAutoSelect  = false;
     base.reLoad(starSouls.Count);
 }
Exemplo n.º 3
0
 /* methods */
 /** 初始化 */
 public void init(WindowBase fatherWindow, ButtonStoreStarSoul.ButtonStateType stateType)
 {
     this.stateType       = stateType;
     content.fatherWindow = fatherWindow;
     initButton(fatherWindow);
     UpdateUI();
     resetButton();
 }
Exemplo n.º 4
0
    public void initContent(Card card, StarSoul starSoul, ButtonStoreStarSoul.ButtonStateType type)
    {
        //starSoulStorecontent.SetActive(false);
        Utils.RemoveAllChild(starSoulStorecontent.transform);
        GameObject           content = NGUITools.AddChild(starSoulStorecontent, contentPrefab);
        StarSoulStoreContent ssc     = content.GetComponent <StarSoulStoreContent> ();
        //筛选条件
        SortCondition sc = new SortCondition();

        sc.sortCondition = new Condition(SortType.SORT);
        sc.sortCondition.conditions.Add(SortType.SORT_QUALITYDOWN);
        int [] intArray = StarSoulManager.Instance.getCardSoulExistType(card, starSoul);
        //屏蔽掉筛选的同类型星魂
        sc.addSiftCondition(new Condition(SortType.STARSOUL_TYPE, intArray));
        ssc.sc = sc;
        ssc.init(this, type);
    }
Exemplo n.º 5
0
 /* properties */
 /** 设置初始类型 */
 public void setIntoType(ButtonStoreStarSoul.ButtonStateType intoType)
 {
     this.intoType = intoType;
 }
Exemplo n.º 6
0
 /* methods */
 /// <summary>
 /// 更新星魂数据
 /// </summary>
 /// <param name="starSoul">星魂</param>
 /// <param name="stateType">显示状态类型</param>
 public void UpdateSoul(StarSoul starSoul, ButtonStoreStarSoul.ButtonStateType stateType)
 {
     this.starSoul  = starSoul;
     this.stateType = stateType;
     UpdateUI();
 }
Exemplo n.º 7
0
 /* properties */
 /** 设置进入状态类型 */
 public void setStateType(ButtonStoreStarSoul.ButtonStateType stateType)
 {
     this.stateType = stateType;
 }
Exemplo n.º 8
0
 /** button点击事件 */
 public void buttonEventBase(GameObject gameObj)
 {
     if (gameObj.name == "buttonLocked")
     {
         StarSoulManager.Instance.clearLockStateDic();
         contentNumItem.SetActive(false);
         chooseDescItem.SetActive(true);
         if (buttonExChangeExp != null)
         {
             buttonExChangeExp.gameObject.SetActive(false);
         }
         if (buttonLocked != null)
         {
             buttonLocked.gameObject.SetActive(false);
         }
         buttonConfirmExchangeExp.gameObject.SetActive(false);
         buttonOneKeyExp.gameObject.SetActive(false);
         buttonCancel.gameObject.SetActive(true);
         if (buttonConfirmLocked != null)
         {
             buttonConfirmLocked.gameObject.SetActive(true);
         }
         chooseDescLabel.text = LanguageConfigManager.Instance.getLanguage("StarSoulWindow_storeContent_lockDesc");
         content.setIntoType(ButtonStoreStarSoul.ButtonStateType.Lock);
         content.updateVisibleItem();
         MaskWindow.UnlockUI();
     }
     else if (gameObj.name == "buttonExChangeExp")
     {
         StarSoulManager.Instance.clearChangeExpStateDic();
         contentNumItem.SetActive(false);
         chooseDescItem.SetActive(true);
         if (buttonExChangeExp != null)
         {
             buttonExChangeExp.gameObject.SetActive(false);
         }
         if (buttonLocked != null)
         {
             buttonLocked.gameObject.SetActive(false);
         }
         buttonConfirmExchangeExp.gameObject.SetActive(true);
         buttonOneKeyExp.gameObject.SetActive(true);
         buttonCancel.gameObject.SetActive(true);
         if (buttonConfirmLocked != null)
         {
             buttonConfirmLocked.gameObject.SetActive(false);
         }
         chooseDescLabel.text = LanguageConfigManager.Instance.getLanguage("StarSoulWindow_storeContent_changeDesc");
         sc       = SortConditionManagerment.Instance.getConditionsByKey(SiftWindowType.SIFT_STARSOULSTORE_WINDOW);
         moveTpye = EquipStateType.OCCUPY;
         content.setIntoType(ButtonStoreStarSoul.ButtonStateType.CHANGE);
         stateType = ButtonStoreStarSoul.ButtonStateType.CHANGE;
         updateContent();
         MaskWindow.UnlockUI();
     }
     else if (gameObj.name == "buttonConfirmLocked")
     {
         DoLocked();
     }
     else if (gameObj.name == "buttonConfirmExchangeExp")
     {
         DoExchangeExp();
     }
     else if (gameObj.name == "buttonCancel")
     {
         StarSoulManager.Instance.cleanDic();
         content.setIntoType(ButtonStoreStarSoul.ButtonStateType.Power);
         stateType = ButtonStoreStarSoul.ButtonStateType.Power;
         resetButton();
         updateContent();
         //UpdateUI();
         MaskWindow.UnlockUI();
     }
     else if (gameObj.name == "buttonOneKeyExp")
     {
         if (GameManager.Instance.isShowStarSoulOneKeySelect)
         {
             UiManager.Instance.openDialogWindow <StarSoulOneKeySelectWindow>((win) => {
                 win.callback = oneKeySelectCallback;
                 win.init();
             });
         }
         else
         {
             oneKeySelectCallback();
             MaskWindow.UnlockUI();
         }
     }
     else
     {
         MaskWindow.UnlockUI();
     }
 }