public void oneKey() { List <Card> list = IntensifyCardManager.Instance.getOneKeyAddon(); if (list == null || list.Count == 0) { //UiManager.Instance.createMessageLintWindow(LanguageConfigManager.Instance.getLanguage("Intensify6")); UiManager.Instance.openDialogWindow <MessageWindow> ((winn) => { winn.dialogCloseUnlockUI = false; winn.initWindow(2, LanguageConfigManager.Instance.getLanguage("go_to_happy"), LanguageConfigManager.Instance.getLanguage("s0094"), LanguageConfigManager.Instance.getLanguage("go_to_happy1"), gotoHappy); }); return; } for (int i = 0; i < list.Count; i++) { if (sacrificeRotCtrl.isOneOfTheCaster(list [i])) { continue; } SacrificeShowerCtrl ctrl = sacrificeRotCtrl.selectOneEmptyCastShower(); if (ctrl == null) { break; } ctrl.updateShower(list [i]); IntensifyCardManager.Instance.setFoodCard(list [i]); } win.updateInfo(); }
/// <summary> /// 选择精灵动画 /// </summary> private void playAimi(ButtonSpriteAdd bsa, CallBack callback) { ArrayList storgeSpriteList; storgeSpriteList = bsa.spriteList; Card card; for (int i = 0; i < storgeSpriteList.Count; i++) { card = storgeSpriteList [i] as Card; if (sacrificeRotCtrl.isOneOfTheCaster(card)) { continue; } SacrificeShowerCtrl ctrl = sacrificeRotCtrl.selectOneEmptyCastShower(); if (ctrl == null) { break; } if (!sacrificeRotCtrl.isCasterFull()) { ctrl.updateShower(card); IntensifyCardManager.Instance.setFoodCard(card); if (callback != null) { callback(); } win.updateInfo(); break; } } }
public void updateCtrl() { isMore = ""; evoCheckBox.gameObject.SetActive(true); changeDescLabel.text = LanguageConfigManager.Instance.getLanguage("inherit_05"); if (GuideManager.Instance.isMoreThanStep(GuideGlobal.NEWFUNSHOW30)) { changeDescLabel.text += LanguageConfigManager.Instance.getLanguage("inherit_11"); } evoCheckBox.value = false; equipCheckBox.value = false; inheritAddonExp = new int[5]; needPropNum = 0; if (propTemp == null) { propTemp = new Prop(PROPSID, 0); needProp.fatherWindow = win; needProp.init(propTemp); } getPropNumStr(needPropNum, 0); if (!IntensifyCardManager.Instance.isHaveMainCard()) { buttonOld.gameObject.SetActive(false); oldRole.updateShower(IntensifyCardManager.Instance.getMainCard()); oldCard = IntensifyCardManager.Instance.getMainCard().Clone() as Card; } else { buttonOld.gameObject.SetActive(true); oldRole.cleanData(); IntensifyCardManager.Instance.clearFood(); buttonNew.gameObject.SetActive(true); newRole.cleanAll(); } if (!IntensifyCardManager.Instance.isHaveFood()) { buttonNew.gameObject.SetActive(false); newRole.updateShower(IntensifyCardManager.Instance.getFoodCard() [0]); } else { buttonNew.gameObject.SetActive(true); newRole.cleanAll(); } setEvoCheckBoxState(); setAddAttr(); getPropNum(); }
void setShower(SacrificeShowerCtrl _shower, string spName) { shower = _shower; if (_shower != null) { _shower.updateShower(card); } if (spName == "") { selectPic.alpha = 0; } else { selectPic.alpha = 1; selectPic.spriteName = spName; } }
/// <summary> /// 更新进化信息 /// </summary> /// <param name="win">父窗口.</param> /// <param name="isChooseFood">如果设置 <c>true</c> 需要选择祭品卡.</param> public void updateCtrl(IntensifyCardWindow _win, bool isChooseFood) { this.win = _win; clearLabelMsg(); inheritAddonExp = new int[5]; //主卡不为空 if (!IntensifyCardManager.Instance.isHaveMainCard()) { Card tmpFoodCard = null; if (!IntensifyCardManager.Instance.isHaveFood()) { tmpFoodCard = IntensifyCardManager.Instance.getFoodCard() [0]; } buttonMain.gameObject.SetActive(false); mainRole.updateShower(IntensifyCardManager.Instance.getMainCard()); /** 如果主卡在超进化阶段 */ if (mainRole.getCard().isInSuperEvo()) { clearRoleAndFood(); UiManager.Instance.createMessageLintWindow(Language("Intensify28")); win.costSum.text = "0"; return; } /** 进化到最大等级 */ else if (mainRole.getCard().isMaxEvoLevel()) { clearRoleAndFood(); UiManager.Instance.createMessageLintWindow(Language("Intensify30")); win.costSum.text = "0"; return; } //主卡不为空就自动上副卡(优先卡片再万能卡) if (isChooseFood) { //先检测有没有副卡,有副卡的时候匹配主卡进化唯一标识,不符合就清理掉自动选 Card tmpMain = IntensifyCardManager.Instance.getMainCard(); if (tmpFoodCard != null && tmpFoodCard.getEvolveNextSid() == tmpMain.getEvolveNextSid()) { food.updateShower(tmpFoodCard); } else { IntensifyCardManager.Instance.clearFood(); Card foodEvoCard = EvolutionManagerment.Instance.getFoodCardForEvo(IntensifyCardManager.Instance.getMainCard()); Prop foodEvoProp = EvolutionManagerment.Instance.getCardByQuilty(IntensifyCardManager.Instance.getMainCard()); if (tmpMain.getQualityId() == QualityType.MYTH) //主卡是神话级卡片 { if (tmpMain.getEvoLevel() < 4) //副卡选择时,万能卡优先(进化等级<= 4) { if ((foodEvoCard != null && foodEvoProp != null) || (foodEvoCard == null && foodEvoProp != null)) { IntensifyCardManager.Instance.setFoodProp(foodEvoProp); initEvoChooseByProp(IntensifyCardManager.Instance.getFoodProp()); } else if ((foodEvoCard != null && foodEvoProp == null)) { IntensifyCardManager.Instance.setFoodCard(foodEvoCard); tmpFoodCard = foodEvoCard; food.updateShower(IntensifyCardManager.Instance.getFoodCard()[0]); } } else //副卡选择时,卡片优先(进化等级> 4) { if ((foodEvoCard != null && foodEvoProp != null) || (foodEvoCard != null && foodEvoProp == null)) { IntensifyCardManager.Instance.setFoodCard(foodEvoCard); tmpFoodCard = foodEvoCard; food.updateShower(IntensifyCardManager.Instance.getFoodCard()[0]); } else if (foodEvoCard == null && foodEvoProp != null) { IntensifyCardManager.Instance.setFoodProp(foodEvoProp); initEvoChooseByProp(IntensifyCardManager.Instance.getFoodProp()); } } } else { if ((foodEvoCard != null && foodEvoProp != null) || (foodEvoCard != null && foodEvoProp == null)) { IntensifyCardManager.Instance.setFoodCard(foodEvoCard); tmpFoodCard = foodEvoCard; food.updateShower(IntensifyCardManager.Instance.getFoodCard() [0]); } else if (foodEvoCard == null && foodEvoProp != null) { IntensifyCardManager.Instance.setFoodProp(foodEvoProp); initEvoChooseByProp(IntensifyCardManager.Instance.getFoodProp()); } } } } //只要有主卡,就无论有没副卡都要显示进化后效果 Card tmpCard = getTempEvoCard(IntensifyCardManager.Instance.getMainCard(), tmpFoodCard); if (tmpCard != null) { tempEvoCard.gameObject.SetActive(true); tempEvoCard.init(tmpCard, this.win, (role) => { CardBookWindow.Show(tmpCard, CardBookWindow.OTHER, null); }); setLabelMsg(IntensifyCardManager.Instance.getMainCard(), tmpCard); } else { tempEvoCard.gameObject.SetActive(false); } } else { clearRoleAndFood(); } if (!IntensifyCardManager.Instance.isHaveFood()) { buttonFood.gameObject.SetActive(false); food.updateShower(IntensifyCardManager.Instance.getFoodCard() [0]); _win.setEvoType(1); } else if (IntensifyCardManager.Instance.getFoodProp() != null) { initEvoChooseByProp(IntensifyCardManager.Instance.getFoodProp()); _win.setEvoType(2); } else { buttonFood.gameObject.SetActive(true); food.cleanAll(); } }
public void updateCtrl(IntensifyCardWindow _win, bool isChooseFood) { this.win = _win; clearLabelMsg(); //主卡不为空 if (!IntensifyCardManager.Instance.isHaveMainCard()) { mainCard = IntensifyCardManager.Instance.getMainCard(); if (!mainCard.isInSuperEvo()) { clearAllData(); /** 最大进化等级 */ if (mainCard.isMaxEvoLevel()) { UiManager.Instance.createMessageLintWindow(Language("Intensify30")); } /** 没达到超进化等级 */ else { UiManager.Instance.createMessageLintWindow(Language("Intensify29")); } win.costSum.text = "0"; return; } buttonMain.gameObject.SetActive(false); mainRole.updateShower(IntensifyCardManager.Instance.getMainCard()); /** 根据主卡进化到下一等级需要进化的次数,开放对应的副卡选择按钮 */ needFoodNum = mainCard.getEvotimesToNextLevel(); updateFoods(needFoodNum); //主卡不为空就自动上副卡(优先卡片再万能卡) if (isChooseFood) { /** 有选择副卡 */ if (IntensifyCardManager.Instance.getHaveGetSuperExoFood()) { Card tmpFoodCard = IntensifyCardManager.Instance.getNewFoodCard(); //先检测有没有副卡,有副卡的时候匹配主卡,符合就放上去 if (tmpFoodCard != null && tmpFoodCard.getEvolveNextSid() == mainCard.getEvolveNextSid()) { foods[lastClickIndex].updateShower(tmpFoodCard); buttonFoods[lastClickIndex].gameObject.SetActive(false); } } /** 如果一张卡或道具都没选,自动帮选,优先同名卡,其次万能卡 */ else if (IntensifyCardManager.Instance.getFoodPropNum() == 0 && IntensifyCardManager.Instance.getFoodCard().Count == 0) { List <Card> foodEvoCards = new List <Card>(); foodEvoCards.AddRange(EvolutionManagerment.Instance.getFoodCardsForSuperEvo(IntensifyCardManager.Instance.getMainCard())); Prop foodEvoProp = EvolutionManagerment.Instance.getCardByQuilty(IntensifyCardManager.Instance.getMainCard()); int usePropNum = 0;//自动使用的万能卡数量 for (int i = 0; i < needFoodNum; i++) { if (i < foodEvoCards.Count) { IntensifyCardManager.Instance.setFoodCard(foodEvoCards[i]); foods[i].updateShower(foodEvoCards[i]); buttonFoods[i].gameObject.SetActive(false); } else if (foodEvoProp != null && usePropNum < foodEvoProp.getNum()) { IntensifyCardManager.Instance.setFoodProp(foodEvoProp); foods[i].updateShowerByProp(foodEvoProp); buttonFoods[i].gameObject.SetActive(false); usePropNum++; } } } } IntensifyCardManager.Instance.resetSuperExoChoosedNum(); updateDesLabel(mainCard); } else { buttonMain.gameObject.SetActive(true); clearAllData(); } }