public void Refresh() { Clear(); foreach (int heroCardID in BuildCards.GetHeroCardIDs(M_SelectMode)) { int pid = AllCards.GetCard(heroCardID).BaseInfo.PictureID; LevelEditorPanel_HeroCardPicIcon heroCardPicIcon = GameObjectPoolManager.Instance.PoolDict[GameObjectPoolManager.PrefabNames.LevelEditorPanel_HeroCardPicIcon].AllocateGameObject <LevelEditorPanel_HeroCardPicIcon>(HeroCardPicIconContainer); heroCardPicIcon.Initialize(pid, heroCardID); HeroCardPicIcons.Add(heroCardPicIcon); } foreach (KeyValuePair <CardStatTypes, int> kv in BuildCards.GetTypeCardCountDict(M_SelectMode)) { LevelEditorPanel_TypeCardCount typeCardCount = GameObjectPoolManager.Instance.PoolDict[GameObjectPoolManager.PrefabNames.LevelEditorPanel_TypeCardCount].AllocateGameObject <LevelEditorPanel_TypeCardCount>(TypeCardCountContainer); typeCardCount.Initialize( kv.Key, kv.Value, onClick: delegate { GotoAction?.Invoke(); RefreshTypeCardCountButtons(typeCardCount.CardStatType); RefreshBars(typeCardCount.CardStatType); ShowCardStatTypeChange?.Invoke(typeCardCount.CardStatType); }); TypeCardCounts.Add(typeCardCount); } RefreshBars(CardStatTypes.Total); }
public SortedDictionary <CardStatTypes, int> GetTypeCardCountDict(Editor_CardSelectModes mode) { SortedDictionary <CardStatTypes, int> res = new SortedDictionary <CardStatTypes, int>(); res.Add(CardStatTypes.Total, 0); res.Add(CardStatTypes.HeroMech, 0); res.Add(CardStatTypes.SoldierMech, 0); res.Add(CardStatTypes.Equip, 0); res.Add(CardStatTypes.Energy, 0); res.Add(CardStatTypes.Spell, 0); foreach (KeyValuePair <int, CardSelectInfo> kv in CardSelectInfos) { CardStatTypes type = AllCards.GetCard(kv.Key).CardStatType; if (mode == Editor_CardSelectModes.SelectCount) { res[type] += kv.Value.CardSelectCount; res[CardStatTypes.Total] += kv.Value.CardSelectCount; } else if (mode == Editor_CardSelectModes.UpperLimit) { res[type] += kv.Value.CardSelectUpperLimit; res[CardStatTypes.Total] += kv.Value.CardSelectUpperLimit; } } return(res); }
public List <int> GetHeroCardIDs(Editor_CardSelectModes mode) { List <int> heroCardIDs = new List <int>(); foreach (KeyValuePair <int, CardSelectInfo> kv in CardSelectInfos) { if (AllCards.GetCard(kv.Key).CardStatType == CardStatTypes.HeroMech) { if (mode == Editor_CardSelectModes.SelectCount) { for (int i = 0; i < kv.Value.CardSelectCount; i++) { heroCardIDs.Add(kv.Key); } } else if (mode == Editor_CardSelectModes.UpperLimit) { for (int i = 0; i < kv.Value.CardSelectUpperLimit; i++) { heroCardIDs.Add(kv.Key); } } } } return(heroCardIDs); }
public void UpdateCoolDownCards() { List <CoolingDownCard> removeList = new List <CoolingDownCard>(); foreach (CoolingDownCard coolingDownCard in CoolingDownCards) { if (coolingDownCard.LeftRounds == 1) { CardInfo_Base cib = AllCards.GetCard(coolingDownCard.CardID); removeList.Add(coolingDownCard); AbandonCards.Add(cib); } else { coolingDownCard.LeftRounds--; UpdateCoolDownCardHandler(coolingDownCard); } } foreach (CoolingDownCard coolingDownCard in removeList) { CoolingDownCards.Remove(coolingDownCard); RemoveCoolDownCardHandler(coolingDownCard); } AbandonCardRecycle(); }
public void Init(CardDeck.CoolingDownCard cdc, ClientPlayer clientPlayer) { ClientPlayer = clientPlayer; M_CoolingDownCard = cdc; CoolDownRoundText.text = cdc.LeftRounds.ToString(); ClientUtils.ChangeImagePicture(Image, AllCards.GetCard(cdc.CardID).BaseInfo.PictureID); CooldDownIconAnim.SetTrigger("Add"); }
public virtual void Initialize(Bonus bonus) { Bonus = bonus; if (ItemDesc) { ItemDesc.text = Utils.TextMeshProColorStringConvertToText(Bonus.GetDesc()); } if (bonus is Bonus_UnlockCardByID b_UnlockCardByID) { BonusCardInfo = AllCards.GetCard(b_UnlockCardByID.CardID); } }
public void RandomInsertTempCard(int cardId, int count) { if (cardId == (int)AllCards.EmptyCardTypes.NoCard) { return; } for (int i = 0; i < count; i++) { CardInfo_Base cb = AllCards.GetCard(cardId); int index = new Random().Next(0, Cards.Count); AddCard(cb, index); } }
public int GetSideEffectFunctionBias() { CardInfo_Base card = AllCards.GetCard(M_SideEffectParam.GetParam_ConstInt("SummonCardID")); if (card != null) { return(card.GetCardUseBias() * 3); } else { return(0); } }
public override void Initialize(ShopItem shopItem) { base.Initialize(shopItem); ShopItem_Card si_card = (ShopItem_Card)shopItem; M_CardBase = CardBase.InstantiateCardByCardInfo(AllCards.GetCard(si_card.GenerateCardID), CardContainer, CardBase.CardShowMode.CardReward); M_CardBase.transform.localPosition = CardRotateSample.localPosition; M_CardBase.transform.localRotation = CardRotateSample.localRotation; M_CardBase.transform.localScale = CardRotateSample.localScale; M_CardBase.CardOrder = 1; M_CardBase.BeBrightColor(); M_CardBase.ShowCardBloom(false); }
internal void GetTempCardsByID(int cardID, int count) { for (int i = 0; i < count; i++) { CardInfo_Base cardInfo = AllCards.GetCard(cardID); CardBase newCard = CardBase.InstantiateCardByCardInfo(cardInfo, BattlePlayer, BattlePlayer.GameManager.GenerateNewTempCardInstanceId()); bool checkHand = HandAddCard(newCard); if (checkHand) { OnPlayerGetCard(cardID, newCard.M_CardInstanceId); } } }
public override string GenerateDesc() { int cardID = M_SideEffectParam.GetParam_ConstInt("SummonCardID"); int count = M_SideEffectParam.GetParam_ConstInt("NumberOfSummon"); if (!AllCards.CardDict.ContainsKey(cardID)) { return("Error!!!"); } BaseInfo bi = AllCards.GetCard(cardID).BaseInfo; return(base.GenerateDesc() + HighlightStringFormat(DescRaws[LanguageManager_Common.GetCurrentLanguage()], bi.CardNames[LanguageManager_Common.GetCurrentLanguage()], count <= 1 ? "" : ("*" + count), GetDescOfTargetRange())); }
IEnumerator SubCo_GetCard(int indexNumber, int totalCardNumber, DrawCardRequest.CardIdAndInstanceId cardIdAndInstanceId, float duration) //animation of draw single card { CardInfo_Base newCardInfoBase = AllCards.GetCard(cardIdAndInstanceId.CardId); CardBase newCardBase = CardBase.InstantiateCardByCardInfo(newCardInfoBase, transform, CardBase.CardShowMode.HandCard, ClientPlayer); newCardBase.M_CardInstanceId = cardIdAndInstanceId.CardInstanceId; cards.Add(newCardBase); RefreshCardsOrderInLayer(); RefreshAllCardUsable(); Transform deckCardTran = ClientPlayer.BattlePlayer.CardDeckManager.GetFirstCardDeckCardPos(); Transform srcTran = DrawCardPivots[0]; Transform tarTran = GetCardPlace(indexNumber, totalCardNumber); Vector3 tarPos = tarTran.position; Quaternion tarRotation = tarTran.rotation; newCardBase.transform.position = deckCardTran.position; newCardBase.transform.rotation = srcTran.rotation; newCardBase.transform.localScale = Vector3.one * HAND_CARD_SIZE; newCardBase.BoxCollider.enabled = false; Vector3[] path = new Vector3[DrawCardPivots.Length]; for (int i = 1; i < DrawCardPivots.Length; i++) { path[i - 1] = DrawCardPivots[i].position; } path[path.Length - 1] = tarPos; newCardBase.transform.DOPath(path, duration, PathType.CatmullRom); AudioManager.Instance.SoundPlay("sfx/DrawCard0", 0.4f); Sequence seq = DOTween.Sequence(); for (int i = 1; i < DrawCardPivots.Length - 1; i++) { seq.Append(newCardBase.transform.DORotateQuaternion(DrawCardPivots[i].rotation, duration / DrawCardPivots.Length).SetEase(Ease.InOutQuart)); } seq.Append(newCardBase.transform.DORotateQuaternion(tarRotation, duration / DrawCardPivots.Length).SetEase(Ease.InOutQuart)); seq.Append(newCardBase.transform.DORotateQuaternion(tarRotation, duration / DrawCardPivots.Length).SetEase(Ease.Linear)); seq.Play(); yield return(new WaitForSeconds(duration)); newCardBase.BoxCollider.enabled = true; yield return(null); }
public override string GenerateDesc() { int cardID = M_SideEffectParam.GetParam_ConstInt("SummonCardID"); if (cardID == (int)AllCards.EmptyCardTypes.NoCard || cardID == (int)AllCards.EmptyCardTypes.EmptyCard) { return("Error!!!"); } BaseInfo bi = AllCards.GetCard(cardID).BaseInfo; return(base.GenerateDesc() + HighlightStringFormat(DescRaws[LanguageManager_Common.GetCurrentLanguage()], GetDescOfTargetRange(), bi.CardNames[LanguageManager_Common.GetCurrentLanguage()])); }
public bool IsEnergyEnough() { foreach (KeyValuePair <int, BuildCards.CardSelectInfo> kv in M_BuildCards.CardSelectInfos) { if (kv.Value.CardSelectCount <= 0) { continue; } if (AllCards.GetCard(kv.Key).BaseInfo.Energy > Energy) { return(false); } } return(true); }
public override string GenerateDesc() { int cardID = M_SideEffectParam.GetParam_ConstInt("CardID"); if (cardID == (int)AllCards.EmptyCardTypes.NoCard || cardID == (int)AllCards.EmptyCardTypes.EmptyCard) { return("Error!!!"); } BaseInfo bi = AllCards.GetCard(cardID).BaseInfo; return(HighlightStringFormat( DescRaws[LanguageManager_Common.GetCurrentLanguage()], SideEffectExecute.TriggerRangeDesc[LanguageManager_Common.GetCurrentLanguage()][TriggerRange], "[" + bi.CardNames[LanguageManager_Common.GetCurrentLanguage()] + "]")); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); EditorGUILayout.Space(); EditorGUILayout.Separator(); GUILayout.Label("Controls for Debug"); int cardOrder = EditorGUILayout.IntField("CardOrder", CardBase.CardOrder); previewCardID = EditorGUILayout.IntField("PreviewCardID", previewCardID); if (GUI.changed) { CardBase.CardOrder = cardOrder; CardInfo_Base ci = AllCards.GetCard(previewCardID); if (ci != null) { CardBase.Initiate(ci, CardBase.CardShowMode.ShowCard); } } }
public override bool Execute(ExecutorInfo executorInfo) { if (!base.Execute(executorInfo)) { return(false); } BattlePlayer player = (BattlePlayer)Player; int value = player.GameManager.CountMechsByTargetRange(TargetRange, player); for (int i = 0; i < value; i++) { int summonCardID = M_SideEffectParam.GetParam_ConstInt("SummonCardID"); if (summonCardID != (int)AllCards.EmptyCardTypes.NoCard) { player.BattleGroundManager.AddMech((CardInfo_Mech)AllCards.GetCard(M_SideEffectParam.GetParam_ConstInt("SummonCardID"))); } } return(true); }
public SortedDictionary <int, int> GetCostDictByEnergy(Editor_CardSelectModes mode, CardStatTypes cardStatType) { SortedDictionary <int, int> res = new SortedDictionary <int, int>(); for (int i = 0; i <= 10; i++) { res.Add(i, 0); } foreach (KeyValuePair <int, CardSelectInfo> kv in CardSelectInfos) { CardInfo_Base ci = AllCards.GetCard(kv.Key); if (cardStatType == CardStatTypes.Total || ci.CardStatType == cardStatType) { if (mode == Editor_CardSelectModes.SelectCount) { if (ci.BaseInfo.Energy < 10) { res[ci.BaseInfo.Energy] += kv.Value.CardSelectCount; } else { res[10] += kv.Value.CardSelectCount; } } else if (mode == Editor_CardSelectModes.UpperLimit) { if (ci.BaseInfo.Energy < 10) { res[ci.BaseInfo.Energy] += kv.Value.CardSelectUpperLimit; } else { res[10] += kv.Value.CardSelectUpperLimit; } } } } return(res); }
private PropertyFormRow GeneralizeRow(int cardID) { CardInfo_Base ci = AllCards.GetCard(cardID); if (ci != null) { LevelEditorPanel_CardRow cr = GameObjectPoolManager.Instance.PoolDict[GameObjectPoolManager.PrefabNames.LevelEditorPanel_CardRow].AllocateGameObject <LevelEditorPanel_CardRow>(CardRowContainer); cr.Initialize( ci, onMoveUp: MoveUpCard, onMoveDown: MoveDownCard, onRemove: RemoveCard ); My_CardRows.Add(cr); return(cr); } else { return(null); } }
internal void GetACardByID(int cardID, int overrideCardInstanceID = -1) { CardInfo_Base cardInfo = AllCards.GetCard(cardID); CardBase newCard; if (overrideCardInstanceID == -1) { newCard = CardBase.InstantiateCardByCardInfo(cardInfo, BattlePlayer, BattlePlayer.GameManager.GenerateNewTempCardInstanceId()); } else { newCard = CardBase.InstantiateCardByCardInfo(cardInfo, BattlePlayer, overrideCardInstanceID); } bool checkHand = HandAddCard(newCard); if (checkHand) { OnPlayerGetCard(cardID, newCard.M_CardInstanceId); } }
public override void Initialize(Bonus bonus) { base.Initialize(bonus); UnlockText.enabled = false; UnlockImage.enabled = false; switch (bonus) { case Bonus_UnlockCardByID _b: { CurrentCard = CardBase.InstantiateCardByCardInfo(AllCards.GetCard(_b.CardID), CardContainer, CardBase.CardShowMode.CardReward, RoundManager.Instance.SelfClientPlayer); CurrentCard.transform.localScale = CardRotationSample.localScale; CurrentCard.transform.rotation = CardRotationSample.rotation; CurrentCard.transform.position = CardRotationSample.position; CurrentCard.CardOrder = 1; UnlockText.enabled = true; UnlockImage.enabled = true; Color newColor = ClientUtils.HTMLColorToColor(CurrentCard.CardInfo.GetCardColor()); UnlockImage.color = new Color(newColor.r / 1.5f, newColor.g / 1.5f, newColor.b / 1.5f); break; } } }
private void RefreshUpgradePanel() { bool hasUpgradeCard = false; bool hasDegradeCard = false; if (SelectBuildManager.Instance.CurrentGameMode == SelectBuildManager.GameMode.Single) { int u_id = PreviewCard_Src.CardInfo.UpgradeInfo.UpgradeCardID; int d_id = PreviewCard_Src.CardInfo.UpgradeInfo.DegradeCardID; hasUpgradeCard = u_id != -1 && StoryManager.Instance.GetStory().CardUnlockInfos[u_id]; hasDegradeCard = d_id != -1 && StoryManager.Instance.GetStory().CardUnlockInfos[d_id]; } else if (SelectBuildManager.Instance.CurrentGameMode == SelectBuildManager.GameMode.Online) { hasUpgradeCard = PreviewCard_Src.CardInfo.UpgradeInfo.UpgradeCardID != -1; hasDegradeCard = PreviewCard_Src.CardInfo.UpgradeInfo.DegradeCardID != -1; } UpgradeCardButton.gameObject.SetActive(hasUpgradeCard); if (hasUpgradeCard) { int moreCoin = AllCards.GetCard(PreviewCard_Src.CardInfo.UpgradeInfo.UpgradeCardID).BaseInfo.Coin - PreviewCard_Src.CardInfo.BaseInfo.Coin; UpgradeCoinText.text = (-moreCoin).ToString(); } DegradeCardButton.gameObject.SetActive(hasDegradeCard); if (hasDegradeCard) { int lessCoin = AllCards.GetCard(PreviewCard_Src.CardInfo.UpgradeInfo.DegradeCardID).BaseInfo.Coin - PreviewCard_Src.CardInfo.BaseInfo.Coin; if (lessCoin == 0) { DegradeCoinText.text = "0"; } else if (lessCoin < 0) { DegradeCoinText.text = "+" + (-lessCoin); } } }
public void RecycleCardInstanceID(int cardInstanceId) { if (cardInstanceId < 0) { return; // 临时卡不参与卡组循环 } if (CardInstanceIdDict.ContainsKey(cardInstanceId)) { CardInfo_Base cib = AllCards.GetCard(CardInstanceIdDict[cardInstanceId]); if (cib.BaseInfo.CardType == CardTypes.Mech && !cib.MechInfo.IsSoldier) { CoolingDownCard cdc = new CoolingDownCard(cib.CardID, cardInstanceId, 2, true); CoolingDownCards.Add(cdc); UpdateCoolDownCardHandler(cdc); } else { AbandonCards.Add(cib); } CardInstanceIdDict.Remove(cardInstanceId); } }
public override bool Execute(ExecutorInfo executorInfo) { if (!base.Execute(executorInfo)) { return(false); } BattlePlayer player = (BattlePlayer)Player; int count = M_SideEffectParam.GetParam_ConstInt("NumberOfSummon"); player.GameManager.SideEffect_ShipAction( delegate(BattlePlayer sp) { for (int i = 0; i < count; i++) { sp.BattleGroundManager.AddMech((CardInfo_Mech)AllCards.GetCard(M_SideEffectParam.GetParam_ConstInt("SummonCardID"))); } }, player, ChoiceCount, TargetRange, TargetSelect, executorInfo.TargetClientIds); return(true); }
private void RefreshPreviewCard(bool refreshAffixPanel = true, UpgradeDegradeOperation operation = UpgradeDegradeOperation.None) { if (PreviewCard) { PreviewCard.ShowCardBloom(true); PreviewCard.PoolRecycle(); PreviewCard = null; } if (PreviewCardDegrade) { } if (PreviewCard_Src.CardInfo.BaseInfo.LimitNum == 0 && operation != UpgradeDegradeOperation.None) { if (operation == UpgradeDegradeOperation.Degrade) { PreviewCard_Src = UIManager.Instance.GetBaseUIForm <SelectBuildPanel>().AllCards[PreviewCard_Src.CardInfo.UpgradeInfo.DegradeCardID]; } else if (operation == UpgradeDegradeOperation.Upgrade) { PreviewCard_Src = UIManager.Instance.GetBaseUIForm <SelectBuildPanel>().AllCards[PreviewCard_Src.CardInfo.UpgradeInfo.UpgradeCardID]; } } PreviewCard = CardBase.InstantiateCardByCardInfo(PreviewCard_Src.CardInfo, PreviewContent, CardBase.CardShowMode.CardUpgradePreview); if (UIManager.Instance.GetBaseUIForm <SelectBuildPanel>().CurrentEditBuildButton) { PreviewCard.ChangeCardSelectLimit(UIManager.Instance.GetBaseUIForm <SelectBuildPanel>().CurrentEditBuildButton.BuildInfo.M_BuildCards.CardSelectInfos[PreviewCard.CardInfo.CardID].CardSelectUpperLimit, true); } PreviewCard.SetBlockCountValue(UIManager.Instance.GetBaseUIForm <SelectBuildPanel>().GetSelectedCardCount(PreviewCard.CardInfo.CardID), true); PreviewCard.transform.localScale = Vector3.one * 18; PreviewCard.transform.localPosition = new Vector3(0, 50, 0); PreviewCard.ShowCardBloom(true); PreviewCard.ChangeCardBloomColor(ClientUtils.HTMLColorToColor("#FFDD8C"), 2); PreviewCard.BeBrightColor(); PreviewCard.BoxCollider.enabled = false; PreviewCard.ShowAllSlotBlooms(true); bool hasUpgradeCard = false; bool hasDegradeCard = false; if (SelectBuildManager.Instance.CurrentGameMode == SelectBuildManager.GameMode.Single) { int u_id = PreviewCard_Src.CardInfo.UpgradeInfo.UpgradeCardID; int d_id = PreviewCard_Src.CardInfo.UpgradeInfo.DegradeCardID; hasUpgradeCard = u_id != -1 && StoryManager.Instance.GetStory().CardUnlockInfos[u_id]; hasDegradeCard = d_id != -1 && StoryManager.Instance.GetStory().CardUnlockInfos[d_id]; } else if (SelectBuildManager.Instance.CurrentGameMode == SelectBuildManager.GameMode.Online) { hasUpgradeCard = PreviewCard_Src.CardInfo.UpgradeInfo.UpgradeCardID != -1; hasDegradeCard = PreviewCard_Src.CardInfo.UpgradeInfo.DegradeCardID != -1; } if (hasUpgradeCard) { if (!PreviewCardUpgrade) { PreviewCardUpgrade = CardBase.InstantiateCardByCardInfo(AllCards.GetCard(PreviewCard_Src.CardInfo.UpgradeInfo.UpgradeCardID), PreviewContent, CardBase.CardShowMode.CardUpgradePreview); } else { PreviewCardUpgrade.Initiate(AllCards.GetCard(PreviewCard_Src.CardInfo.UpgradeInfo.UpgradeCardID), CardBase.CardShowMode.CardUpgradePreview); } PreviewCardUpgrade.ChangeCardSelectLimit(UIManager.Instance.GetBaseUIForm <SelectBuildPanel>().CurrentEditBuildButton.BuildInfo.M_BuildCards.CardSelectInfos[PreviewCardUpgrade.CardInfo.CardID].CardSelectUpperLimit, true); PreviewCardUpgrade.SetBlockCountValue(UIManager.Instance.GetBaseUIForm <SelectBuildPanel>().GetSelectedCardCount(PreviewCardUpgrade.CardInfo.CardID), true); PreviewCardUpgrade.transform.localScale = Vector3.one * 15; if (PreviewCardUpgrade.CardInfo.BaseInfo.CardType == CardTypes.Mech) { PreviewCardUpgrade.transform.localPosition = new Vector3(mechCardPreviewDistance, 50, 0); UpgradeArrow.transform.position = UpgradeArrowPivot_mechCards.position; } else { PreviewCardUpgrade.transform.localPosition = new Vector3(normalCardPreviewDistance, 50, 0); UpgradeArrow.transform.position = UpgradeArrowPivot_normal.position; } UpgradeArrow.enabled = true; PreviewCardUpgrade.ShowCardBloom(true); PreviewCardUpgrade.ChangeCardBloomColor(ClientUtils.HTMLColorToColor("#FD5400"), 2); PreviewCardUpgrade.BeBrightColor(); PreviewCardUpgrade.BoxCollider.enabled = false; PreviewCardUpgrade.ShowAllSlotBlooms(true); PreviewCardUpgrade.RefreshCardTextLanguage(); } else { if (PreviewCardUpgrade) { PreviewCardUpgrade.ShowCardBloom(true); PreviewCardUpgrade.PoolRecycle(); PreviewCardUpgrade = null; } UpgradeArrow.enabled = false; } if (hasDegradeCard) { if (!PreviewCardDegrade) { PreviewCardDegrade = CardBase.InstantiateCardByCardInfo(AllCards.GetCard(PreviewCard_Src.CardInfo.UpgradeInfo.DegradeCardID), PreviewContent, CardBase.CardShowMode.CardUpgradePreview); } else { PreviewCardDegrade.Initiate(AllCards.GetCard(PreviewCard_Src.CardInfo.UpgradeInfo.DegradeCardID), CardBase.CardShowMode.CardUpgradePreview); } PreviewCardDegrade.ChangeCardSelectLimit(UIManager.Instance.GetBaseUIForm <SelectBuildPanel>().CurrentEditBuildButton.BuildInfo.M_BuildCards.CardSelectInfos[PreviewCardDegrade.CardInfo.CardID].CardSelectUpperLimit, true); PreviewCardDegrade.SetBlockCountValue(UIManager.Instance.GetBaseUIForm <SelectBuildPanel>().GetSelectedCardCount(PreviewCardDegrade.CardInfo.CardID), true); PreviewCardDegrade.transform.localScale = Vector3.one * 15; if (PreviewCardDegrade.CardInfo.BaseInfo.CardType == CardTypes.Mech) { PreviewCardDegrade.transform.localPosition = new Vector3(-mechCardPreviewDistance, 50, 0); DegradeArrow.transform.position = DegradeArrowPivot_mechCards.position; } else { PreviewCardDegrade.transform.localPosition = new Vector3(-normalCardPreviewDistance, 50, 0); DegradeArrow.transform.position = DegradeArrowPivot_normal.position; } PreviewCardDegrade.ShowCardBloom(true); PreviewCardDegrade.ChangeCardBloomColor(ClientUtils.HTMLColorToColor("#0CE9FF"), 2); PreviewCardDegrade.BeBrightColor(); PreviewCardDegrade.BoxCollider.enabled = false; PreviewCardDegrade.ShowAllSlotBlooms(true); PreviewCardDegrade.RefreshCoinPosition(); DegradeArrow.enabled = true; } else { if (PreviewCardDegrade) { PreviewCardDegrade.ShowCardBloom(true); PreviewCardDegrade.PoolRecycle(); PreviewCardDegrade = null; } DegradeArrow.enabled = false; } if (refreshAffixPanel) { List <CardInfo_Base> cardInfos = new List <CardInfo_Base>(); cardInfos.Add(PreviewCard.CardInfo); if (PreviewCardDegrade) { cardInfos.Add(PreviewCardDegrade.CardInfo); } if (PreviewCardUpgrade) { cardInfos.Add(PreviewCardUpgrade.CardInfo); } UIManager.Instance.ShowUIForms <AffixPanel>().ShowAffixTips(cardInfos, null); } //如果显示Tips占据屏幕空间的话,右移预览卡牌窗口 if (UIManager.Instance.GetBaseUIForm <AffixPanel>().IsShow&& PreviewCardDegrade != null) { AllContainer.position = PreviewCardPanelRightPivot.position; } else { AllContainer.position = PreviewCardPanelCenterPivot.position; } }
public void OnHover() { BattleManager.Instance.ShowCardDetailInBattleManager.ShowCardDetail(AllCards.GetCard(M_CoolingDownCard.CardID), ClientPlayer.WhichPlayer == Players.Self ? ShowCardDetailInBattleManager.ShowPlaces.LeftLower : ShowCardDetailInBattleManager.ShowPlaces.RightUpper); }