/// <summary> /// 상점 카드정보를 생성. /// </summary> /// <param name="recvData"></param> public void InitCard(_stShopBuyAck recvData) { _CardOpenType = CardOpenType.Shop; if (recvData.vAddCreatures.Count > 0) { _CardTotalCount = recvData.vAddCreatures.Count; } else if (recvData.vAddItems.Count > 0) { _CardTotalCount = recvData.vAddItems.Count; } CreateCard(recvData); }
/// <summary> /// 메일함 카드정보를 생성. /// </summary> /// <param name="stMailReadAck"></param> public void InitCard(_stMailReadAck stMailReadAck) { _CardOpenType = CardOpenType.Mail; _CardTotalCount = 1; // 서버에서 준 데이터에서 크리쳐 정보를 찾는다. CCreatureDetail BoxAddCreateCreature = null; if (stMailReadAck.vItemBoxAddCreateCreature != null) { foreach (CCreatureDetail AddCreature in stMailReadAck.vItemBoxAddCreateCreature) { BoxAddCreateCreature = AddCreature; break; } } // 찾은 크리쳐로 연출 준비 if (BoxAddCreateCreature != null) { _stShopBuyAck stShopBuyAck = new _stShopBuyAck(); stShopBuyAck.cShopBuyGood = new CShopGood(); stShopBuyAck.cShopBuyGood.kPayType = DATA_ITEM_SUB_TYPE_NEW._enItemStatusSubType.ITEMTYPE_MI_DIA; // 카드 뒷면 default stShopBuyAck.vAddCreatures = new _vCreatureDetail(); stShopBuyAck.vAddCreatures.Add(BoxAddCreateCreature); CreateCard(stShopBuyAck); } // 서버에서 준 데이터에서 아이템 정보를 찾는다. CItem vItemBoxAddCreateItem = null; if (stMailReadAck.vItemBoxAddCreateItem != null) { foreach (CItem AddItem in stMailReadAck.vItemBoxAddCreateItem) { vItemBoxAddCreateItem = AddItem; break; } } // 아이템 연출 준비 if (vItemBoxAddCreateItem != null) { _stShopBuyAck stShopBuyAck = new _stShopBuyAck(); stShopBuyAck.cShopBuyGood = new CShopGood(); stShopBuyAck.cShopBuyGood.kPayType = DATA_ITEM_SUB_TYPE_NEW._enItemStatusSubType.ITEMTYPE_MI_DIA; // 카드 뒷면 default stShopBuyAck.vAddItems = new _vItem(); stShopBuyAck.vAddItems.Add(vItemBoxAddCreateItem); CreateCard(stShopBuyAck); } // 연출에 필요한 배경 지우기 UIControlManager.instance.SetMainMenu_3DObject(false); }