public override void SetMenuData(object param) { base.SetMenuData(param); if (param != null) { object[] i = param as object[]; m_type = (DrawCardType)i[0]; m_isHC = (m_type == DrawCardType.hc); } InitView(); }
public override void SetMenuData(object param) { base.SetMenuData(param); if (param != null) { Hashtable data = param as Hashtable; m_type = (DrawCardType)data["type"]; if (m_type == DrawCardType.ur) { URChipId = data["chipdata"] as string[]; } } }
private void GetShowList(DrawCardType type) { switch (type) { case DrawCardType.none: break; case DrawCardType.gold: InitDetailInfo(GoldDraw); break; case DrawCardType.hc: case DrawCardType.ur: InitDetailInfo(HcDraw); break; case DrawCardType.wiki: InitDetailInfo(WikiDraw); break; default: break; } }
public override void OnDestroy() { preType = DrawCardType.none; base.OnDestroy(); }
private void SetDrawPartner() { if (preType != m_type) { preType = m_type; } else { return; } if (m_type == DrawCardType.ur) { int count = URChipId.Length; for (int u = 0; u < SpeacialItemArray.Length; u++) { if (u < count) { SpeacialItemArray[u].LTItemData = new LTShowItemData(URChipId[u], 0, LTShowItemType.TYPE_HEROSHARD); } else { SpeacialItemArray[u].mDMono.gameObject.CustomSetActive(false); } } urchipGrid.CustomSetActive(true); urchipSp.CustomSetActive(true); } else { urchipGrid.CustomSetActive(false); urchipSp.CustomSetActive(false); } GetShowList(DrawType); URScroll.SetItemDatas(URList); int s = URList.Count; if (s == 0) { URWidget.transform.parent.localScale = new Vector3(1, 0, 1); } else { URWidget.transform.parent.localScale = Vector3.one; URWidget.height = 260 * (s / 4 + ((s % 4 != 0) ? 1 : 0)) + 80; } SSRScroll.SetItemDatas(SSRList); int i = SSRList.Count; if (i == 0) { SSRWidget.transform.parent.localScale = new Vector3(1, 0, 1); } else { SSRWidget.transform.parent.localScale = Vector3.one; SSRWidget.height = 260 * (i / 4 + ((i % 4 != 0) ? 1 : 0)) + 80; } SRScroll.SetItemDatas(SRList); int j = SRList.Count; if (j == 0) { SRWidget.transform.parent.localScale = new Vector3(1, 0, 1); } else { SRWidget.transform.parent.localScale = Vector3.one; SRWidget.height = 260 * (j / 4 + ((j % 4 != 0) ? 1 : 0)) + 80; } RScroll.SetItemDatas(RList); int k = RList.Count; if (k == 0) { RWidget.transform.parent.localScale = new Vector3(1, 0, 1); } else { RWidget.transform.parent.localScale = Vector3.one; RWidget.height = 260 * (k / 4 + ((k % 4 != 0) ? 1 : 0)) + 80; } NScroll.SetItemDatas(NList); int m = NList.Count; if (m == 0) { NWidget.transform.parent.localScale = new Vector3(1, 0, 1); } else { NWidget.transform.parent.localScale = Vector3.one; NWidget.height = 260 * (m / 4 + ((m % 4 != 0) ? 1 : 0)) + 80; } scrollview.ResetPosition(); }
public DrawCardEffectProcess(int drawCardNumber, DrawCardType drawCardType, Player ownerPlayer) : base(ownerPlayer, "抽卡") { this.drawCardNumber = drawCardNumber; this.drawCardType = drawCardType; }
public void drawCard(Card card, DrawCardType type, int boxNum, bool redraw = false) { if (redraw == false) { //Debug.WriteLine("Box Number is {0}", boxNum); history[boxNum].Add(new CardHistory(card.Clone(), type, boxNum)); } Rectangle cardPost; if (boxNum != 10) { if (boxNum == 0 || boxNum == 5) { if (boxNum == 0) { cardPost = new Rectangle(playerPos[0], cardSize); setNextCardPos(ref playerPos[0]); } else { cardPost = new Rectangle(playerPos[5], cardSize); setNextCardPos(ref playerPos[5]); } if (type == DrawCardType.Normal) { drawing.TranslateTransform(120.0F, 660.0F); drawing.RotateTransform(-50f); } else if (type == DrawCardType.Double) { drawing.TranslateTransform(-10.0F, 250.0F); drawing.RotateTransform(-20f); } } else if (boxNum == 1 || boxNum == 6) { if (boxNum == 1) { cardPost = new Rectangle(playerPos[1], cardSize); setNextCardPos(ref playerPos[1]); } else { cardPost = new Rectangle(playerPos[6], cardSize); setNextCardPos(ref playerPos[6]); } if (type == DrawCardType.Normal) { drawing.TranslateTransform(-50.0F, 120.0F); drawing.RotateTransform(-10f); } else if (type == DrawCardType.Double) { drawing.TranslateTransform(130.0F, -230.0F); drawing.RotateTransform(20f); } } else if (boxNum == 2 || boxNum == 7) { if (boxNum == 2) { cardPost = new Rectangle(playerPos[2], cardSize); setNextCardPos(ref playerPos[2]); } else { cardPost = new Rectangle(playerPos[7], cardSize); setNextCardPos(ref playerPos[7]); } if (type == DrawCardType.Double) { drawing.TranslateTransform(130.0F, -150.0F); drawing.RotateTransform(20f); } } else if (boxNum == 3 || boxNum == 8) { if (boxNum == 3) { cardPost = new Rectangle(playerPos[3], cardSize); setNextCardPos(ref playerPos[3]); } else { cardPost = new Rectangle(playerPos[8], cardSize); setNextCardPos(ref playerPos[8]); } if (type == DrawCardType.Normal) { drawing.TranslateTransform(100.0F, -50.0F); drawing.RotateTransform(10f); } else if (type == DrawCardType.Double) { drawing.TranslateTransform(450.0F, -100.0F); drawing.RotateTransform(60f); } } else if (boxNum == 4 || boxNum == 9) { if (boxNum == 4) { cardPost = new Rectangle(playerPos[4], cardSize); setNextCardPos(ref playerPos[4]); } else { cardPost = new Rectangle(playerPos[9], cardSize); setNextCardPos(ref playerPos[9]); } if (type == DrawCardType.Normal) { drawing.TranslateTransform(200.0F, -60.0F); drawing.RotateTransform(40f); } else if (type == DrawCardType.Double) { drawing.TranslateTransform(360.0F, -20.0F); drawing.RotateTransform(80f); } } else { cardPost = new Rectangle(playerPos[2], cardSize); } } else { cardPost = new Rectangle(dealerPos, cardSize); dealerPos.X -= 70; } string cardName = card.CardName; Pen pen = new Pen(Color.Black, 1); drawing.SmoothingMode = SmoothingMode.AntiAlias; drawing.DrawImage(ImageRes.GetImage(cardName), cardPost); drawing.DrawRectangle(pen, cardPost); drawing.ResetTransform(); }
public CardHistory(Card card, DrawCardType type, int box) { this.card = card; this.type = type; this.box = box; }