/// <summary> /// 进化端口 /// </summary> private void sendEvoData() { tempCard = mainRole.getCard().Clone() as Card; EvolutionFPort fport = FPortManager.Instance.getFPort("EvolutionFPort") as EvolutionFPort; fport.evolutionCard(mainRole.getCard(), IntensifyCardManager.Instance.getFoodCard(), playEffect); }
/// <summary> /// 进化端口 /// </summary> private void sendEvoData() { tempCard = mainRole.getCard().Clone() as Card; EvolutionFPort fport = FPortManager.Instance.getFPort("EvolutionFPort") as EvolutionFPort; if (evoType == 2) { foodProp = PropManagerment.Instance.createProp(EvolutionManagerment.Instance.getCardByQuilty(mainRole.getCard()).sid); fport.evolutionCard(mainRole.getCard(), playEffect); } else { fport.evolutionCard(mainRole.getCard(), food.getCard(), playEffect); } }
/// <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(); } }