public void CardDelete() { CuUiManager upper = arrMan [0], lower = arrMan[1]; foreach (KeyValuePair <string, GameObject> kv in upper.dicCell) { Destroy(kv.Value); } foreach (KeyValuePair <string, GameObject> kv in lower.dicCell) { Destroy(kv.Value); } upper.dicCell.Clear(); lower.dicCell.Clear(); arrGameObj.Clear(); }
public void ResetFrames() { CuUiManager upper = arrMan [0], lower = arrMan[1]; foreach (KeyValuePair <string, GameObject> kv in upper.dicCell) { Destroy(kv.Value); } foreach (KeyValuePair <string, GameObject> kv in lower.dicCell) { Destroy(kv.Value); } upper.dicCell.Clear(); lower.dicCell.Clear(); AddCellsTo(lower); }
public void AddCellsTo(CuUiManager pManager) { boxScale = new Vector3(dimX * 0.8f, dimY * 0.9f, 0.5f); // 크기 조절. serialN = 0; // for (int k=0; k< eaX - 6; k++) { // 12를 기본으로 넣고.. 6개까지 추가 가능. // for (int ii=0; ii< 1; ii++) { for (int ii = 0; ii < eaY; ii++) { for (int k = 0; k < eaX; k++) { AmCard playerCard = new AmCard(pGrade: 3, pType: 5, pWthr: "CLOUD"); if (k < 1) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KPtitleA"); playerCard = new AmCard(pGrade: 1, pType: 1, pWthr: "CLOUD"); for (int j = 1; j < 1; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 1 && 6 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleA"); playerCard = new AmCard(pGrade: 1, pType: 1, pWthr: "CLOUD"); for (int j = 1; j < 1; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 6 && 9 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleB"); playerCard = new AmCard(pGrade: 2, pType: 2, pWthr: "CLOUD"); for (int j = 1; j < 2; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 9 && 12 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleC"); playerCard = new AmCard(pGrade: 3, pType: 3, pWthr: "CLOUD"); for (int j = 1; j < 3; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 12 && 16 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleD"); playerCard = new AmCard(pGrade: 4, pType: 4, pWthr: "CLOUD"); for (int j = 1; j < 3; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 16) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleS"); playerCard = new AmCard(pGrade: 1, pType: 1, pWthr: "CLOUD"); for (int j = 1; j < 1; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } curObj.name = "Cardmix_" + serialN++; //k.ToString() + ii; curObj.transform.localScale = boxScale; curObj.CellCs().InitPstnSize(optFrame); (" " + optFrame.optSelectSize).HtLog(); arrGameObj.Add(curObj); /* * for (int j=1; j<(serialN % 5 +1); j++) { * curObj.transform.FindChild ("star/star" + j).gameObject.SetActive (false); * } */ //curObj.transform.FindChild ("Plane_playerface").gameObject.GetComponent<UIButtonMessage> ().target = GameObject.Find ("Axis/Camera/Match").gameObject; curObj.transform.FindChild("Plane_playerface").gameObject.GetComponent <UIButtonMessage> ().target = curObj; //----------------------------------------------------- // Type, Grade, Weather .. setting ... curObj.CellCs().PlCard = playerCard; string kind = serialN < 3 ? "ATTK" : "DPNC"; //theMan.AddACell (curObj, k, ii, kind); if (k < 1) { curObj.transform.FindChild("Plane_playerface").gameObject.transform.renderer.material.mainTexture = mRscrcMan.GetTextureIn("Download/playerface", "Keeper0" + (serialN % 2 + 1)); pManager.AddACell(curObj, k, ii, "Keeper", false); } else { curObj.transform.FindChild("Plane_playerface").gameObject.transform.renderer.material.mainTexture = mRscrcMan.GetTextureIn("Download/playerface", "Kicker0" + (serialN % 8 + 1)); pManager.AddACell(curObj, k, ii, "Kicker", false); } } } }