/// <summary> /// 아이템 카드 생성 /// </summary> public void CreateCard(DATA_ITEM_SUB_TYPE_NEW._enItemStatusSubType kPayType, enCardGrade CardGrade, Texture CardTexture, CItem item, DATA_ITEM_NEW ItemTableData, DelegateOnceEventDone cardOpenEvt) { _CardGrade = CardGrade; _CardTexture = CardTexture; _CItem = item; _ItemTableData = ItemTableData; OnCardOpenEvent = cardOpenEvt; if (_CardGrade == enCardGrade.Normal) { _GachaCardUI = UIResourceMgr.CreatePrefab <GachaCard>(BUNDLELIST.PREFABS_UI_CASHSHOP, transform, "GachaCardNormal3D"); } else if (_CardGrade == enCardGrade.Royal) { _GachaCardUI = UIResourceMgr.CreatePrefab <GachaCard>(BUNDLELIST.PREFABS_UI_CASHSHOP, transform, "GachaCardRoyal3D"); } if (_GachaCardUI != null) { #if GMTOOLSHOP _GachaCardUI.Init(kPayType, _CardGrade, item, ItemTableData); _GachaCardUI.gameObject.layer = 0; _GachaCardUI.transform.localPosition = new Vector3(0.0f, 10000.0f, 0.01f); _GachaCardUI.transform.localScale = new Vector3(0.0017f, 0.0017f, 0.0017f); _GachaCardUI.transform.Rotate(new Vector3(0.0f, 180.0f, 0.0f)); _GachaCardUI.gameObject.SetActive(true); #else _GachaCardUI.Init(kPayType, _CardGrade, item, ItemTableData); _GachaCardUI.gameObject.layer = 0; _GachaCardUI.transform.localPosition = new Vector3(0.0f, 10000.0f, 0.01f); _GachaCardUI.transform.localScale = new Vector3(0.0017f, 0.0017f, 0.0017f); _GachaCardUI.transform.Rotate(new Vector3(0.0f, 180.0f, 0.0f)); _GachaCardUI.gameObject.SetActive(true); #endif } SkinnedMeshRenderer skinnedMeshRenderer = _Card.GetComponent <SkinnedMeshRenderer>(); if (skinnedMeshRenderer != null) { if (CardTexture is Texture) { skinnedMeshRenderer.material.mainTexture = (Texture)CardTexture; } //else if (CardTexture is Material) //{ // skinnedMeshRenderer.material.mainTexture = ((Material)CardTexture).mainTexture; //} } }
/// <summary> /// 크리쳐 카드 생성. /// </summary> public void CreateCard(DATA_ITEM_SUB_TYPE_NEW._enItemStatusSubType kPayType, enCardGrade type, Texture CardTexture, CCreatureDetail CreatureDetail, DATA_CREATURE_NEWVER CreatureTableData, DelegateOnceEventDone cardOpenEvt, DelegateOnceEventDoneWithInt event3D) { _CardGrade = type; _CardTexture = CardTexture; _CreatureID = CreatureTableData.m_iCreatureTID; OnCardOpenEvent = cardOpenEvt; onOpen3DEvent = event3D; if (type == enCardGrade.Normal) { _GachaCardUI = UIResourceMgr.CreatePrefab <GachaCard>(BUNDLELIST.PREFABS_UI_CASHSHOP, transform, "GachaCardNormal3D"); } else if (type == enCardGrade.Royal) { _GachaCardUI = UIResourceMgr.CreatePrefab <GachaCard>(BUNDLELIST.PREFABS_UI_CASHSHOP, transform, "GachaCardRoyal3D"); } if (_GachaCardUI != null) { _GachaCardUI.Init(CreatureDetail); _GachaCardUI.gameObject.layer = 0; _GachaCardUI.transform.localPosition = new Vector3(0.0f, 10000.0f, 0.01f); _GachaCardUI.transform.localScale = new Vector3(0.0017f, 0.0017f, 0.0017f); _GachaCardUI.transform.Rotate(new Vector3(0.0f, 180.0f, 0.0f)); _GachaCardUI.gameObject.SetActive(true); } SkinnedMeshRenderer skinnedMeshRenderer = _Card.GetComponent <SkinnedMeshRenderer>(); if (skinnedMeshRenderer != null) { if (CardTexture is Texture) { skinnedMeshRenderer.material.mainTexture = (Texture)CardTexture; } //else if (CardTexture is Material) //{ // skinnedMeshRenderer.material.mainTexture = ((Material)CardTexture).mainTexture; //} } }