internal CardInfo_Base CardInfo; //卡牌原始数值信息 public static CardBase InstantiateCardByCardInfo(CardInfo_Base cardInfo, BattlePlayer battlePlayer, int cardInstanceId) { CardBase newCard; switch (cardInfo.BaseInfo.CardType) { case CardTypes.Mech: newCard = new CardMech(); break; case CardTypes.Equip: newCard = new CardEquip(); break; case CardTypes.Spell: newCard = new CardSpell(); break; case CardTypes.Energy: newCard = new CardSpell(); break; default: newCard = new CardMech(); break; } newCard.Initiate(cardInfo, battlePlayer, cardInstanceId); return(newCard); }
IEnumerator Co_ShowSlotBloom(CardEquip cardEquip) { while (true) { foreach (Slot sa in relatedSlots) { sa.ShowSlotBloom(true, false); if (cardEquip.CardInfo.WeaponInfo.WeaponType == WeaponTypes.SniperGun) { if (sa.Mech.CardInfo.MechInfo.IsSniper) { sa.Mech.ShowSniperTipText(true); } } } yield return(new WaitForSeconds(0.4f * BattleEffectsManager.AnimationSpeed)); foreach (Slot sa in relatedSlots) { sa.ShowSlotBloom(false, false); sa.Mech.ShowSniperTipText(false); } yield return(new WaitForSeconds(0.4f * BattleEffectsManager.AnimationSpeed)); } }
public void MouseHoverComponent_OnMousePressEnterImmediately(Vector3 mousePosition) { if (DragManager.Instance.CurrentDrag) { CardEquip cw = DragManager.Instance.CurrentDrag_CardEquip; if (cw && cw.ClientPlayer == ClientPlayer) { if (_mSlotTypes != SlotTypes.None) { ShowSlotBloom(true, false); } } } }
void OnSceneGUI() { CardEquip cb = target as CardEquip; GUIStyle style = new GUIStyle(); style.normal.textColor = new Color(1, 0, 0, 1); style.fontSize = 15; style.fontStyle = FontStyle.Bold; if (cb.CardInfo != null) { Handles.Label(cb.transform.position, "CIID: " + cb.M_CardInstanceId + "\n" + "CID: " + cb.CardInfo.CardID, style); } }
public void ShowTipSlotBlooms(CardEquip cardEquip) { StopShowSlotBloom(); SlotTypes slotType = cardEquip.M_EquipType; foreach (ModuleMech mech in Mechs) { Slot slot1 = mech.CardSlotsComponent.Slots[0]; if (slot1.MSlotTypes == slotType) { if (cardEquip.CardInfo.WeaponInfo.WeaponType == WeaponTypes.SniperGun) { if (mech.CardInfo.MechInfo.IsSniper) { relatedSlots.Add(slot1); } } else { relatedSlots.Add(slot1); } } Slot slot2 = mech.CardSlotsComponent.Slots[1]; if (slot2.MSlotTypes == slotType) { relatedSlots.Add(slot2); } Slot slot3 = mech.CardSlotsComponent.Slots[2]; if (slot3.MSlotTypes == slotType) { relatedSlots.Add(slot3); } Slot slot4 = mech.CardSlotsComponent.Slots[3]; if (slot4.MSlotTypes == slotType) { relatedSlots.Add(slot4); } } currentShowSlotBloom = Co_ShowSlotBloom(cardEquip); BattleEffectsManager.Instance.Effect_TipSlotBloom.EffectsShow(currentShowSlotBloom, "Co_ShowSlotBloom"); }