void SetPresettingSetting() { //프리셋 등록 관련 설정 부 string Ateam = UtilMgr.GetTeamCode(transform.FindChild("BG").FindChild("Lteam").GetComponent <UILabel>().text.Replace("[b]", "")); string Hteam = UtilMgr.GetTeamCode(transform.FindChild("BG").FindChild("Rteam").GetComponent <UILabel>().text.Replace("[b]", "")); Debug.Log("List.Count : " + List.Count); //선수 이름 설정 for (int i = 0; i < List.Count; i++) { if (List[i].team == Ateam) { transform.root.FindChild("Scroll").FindChild("Main").FindChild("PreSetting").FindChild("Mid") .FindChild("Scroll View").FindChild("Position").FindChild("Item " + List[i].lineup.ToString()) .FindChild("L_name " + List[i].lineup.ToString()).FindChild("Label") .GetComponent <UILabel>().text = List[i].player; } else if (List[i].team == Hteam) { transform.root.FindChild("Scroll").FindChild("Main").FindChild("PreSetting").FindChild("Mid") .FindChild("Scroll View").FindChild("Position").FindChild("Item " + List[i].lineup.ToString()) .FindChild("R_name " + List[i].lineup.ToString()).FindChild("Label") .GetComponent <UILabel>().text = List[i].player; } } transform.root.FindChild("Scroll").FindChild("Main").FindChild("Gift").gameObject.SetActive(false); UserMgr.CurrentContestSeq = int.Parse(transform.FindChild("BG").FindChild("ContestSeq").GetComponent <UILabel> ().text); UserMgr.CurrentContestMultiEntry = int.Parse(transform.FindChild("BG").FindChild("MultiEntry").GetComponent <UILabel> ().text); UserMgr.CurrentContestTotalEntry = int.Parse(transform.FindChild("BG").FindChild("TotalEntry").GetComponent <UILabel> ().text); transform.parent.parent.parent.FindChild("Nomal Contest").gameObject.SetActive(false); transform.parent.parent.parent.FindChild("PreSetting").gameObject.SetActive(true); transform.parent.parent.parent.FindChild("PreSetting").FindChild("Bot").FindChild("Batting").gameObject.SetActive(false); transform.parent.parent.parent.FindChild("PreSetting").FindChild("Bot").FindChild("Sumit").gameObject.SetActive(false); transform.parent.parent.parent.FindChild("PreSetting").FindChild("Mid").FindChild("Scroll View").GetComponent <UIScrollView> ().ResetPosition(); transform.parent.parent.parent.FindChild("PreSetting").GetComponent <PreSettingCommander> ().Mode = "Add"; transform.parent.parent.parent.FindChild("PreSetting").GetComponent <PreSettingCommander> ().SetTeamName(transform. FindChild("BG").FindChild("Lteam").GetComponent <UILabel> ().text, transform. FindChild("BG").FindChild("Rteam").GetComponent <UILabel> ().text, ""); transform.parent.parent.parent.FindChild("PreSetting").GetComponent <PreSettingCommander> ().Ruby(transform.FindChild("OldBot"). FindChild("Ruby").FindChild("Label").GetComponent <UILabel> ().text, transform.FindChild("OldBot"). FindChild("Mileage").FindChild("Label1").GetComponent <UILabel> ().text, transform.FindChild("OldBot"). FindChild("Mileage").FindChild("Label2").GetComponent <UILabel> ().text ); transform.parent.parent.parent.FindChild("Top").FindChild("Sub").gameObject.SetActive(false); transform.parent.parent.parent.FindChild("Top").FindChild(transform.root.FindChild("Scroll").FindChild("Main").GetComponent <LobbyTopCommander> ().mTopMenuName [0]).gameObject.GetComponent <BoxCollider2D> ().enabled = false; // transform.parent.parent.parent.FindChild ("PreSetting").GetComponent<PreSettingCommander> ().Mode = "Update"; }
void PresetChange() { Debug.Log("PresetChange"); string Ateam = UtilMgr.GetTeamCode(transform.parent.FindChild("LTeam").FindChild("Label").GetComponent <UILabel>().text.Replace("[b]", "")); string Hteam = UtilMgr.GetTeamCode(transform.parent.FindChild("RTeam").FindChild("Label").GetComponent <UILabel>().text.Replace("[b]", "")); Debug.Log("List.Count : " + List.Count); for (int i = 0; i < Lists.Count; i++) { if (Lists[i].team == Ateam) { transform.root.FindChild("Scroll").FindChild("Main").FindChild("PreSetting").FindChild("Mid") .FindChild("Scroll View").FindChild("Position").FindChild("Item " + Lists[i].lineup.ToString()) .FindChild("L_name " + Lists[i].lineup.ToString()).FindChild("Label") .GetComponent <UILabel>().text = Lists[i].player; } else if (Lists[i].team == Hteam) { transform.root.FindChild("Scroll").FindChild("Main").FindChild("PreSetting").FindChild("Mid") .FindChild("Scroll View").FindChild("Position").FindChild("Item " + Lists[i].lineup.ToString()) .FindChild("R_name " + Lists[i].lineup.ToString()).FindChild("Label") .GetComponent <UILabel>().text = Lists[i].player; } } transform.root.FindChild("Scroll").FindChild("Main").FindChild("PreSetting").gameObject.SetActive(true); transform.root.FindChild("Scroll").FindChild("Main").FindChild("PreSetting").GetComponent <PreSettingCommander>() .SetTeamName(transform.parent.FindChild("LTeam").FindChild("Label").GetComponent <UILabel>().text, transform.parent.FindChild("RTeam").FindChild("Label").GetComponent <UILabel>().text, transform.FindChild("Title").FindChild("Panel").FindChild("Label").GetComponent <UILabel>().text); List <string> presetList = new List <string>(); for (int i = 0; i < transform.FindChild("BG").FindChild("presetList").childCount; i++) { if ((i + 1) <= 9) { presetList.Add(transform.FindChild("BG").FindChild("presetList").FindChild("a" + (i + 1).ToString()).GetComponent <UILabel>().text); } else { presetList.Add(transform.FindChild("BG").FindChild("presetList").FindChild("h" + (i - 9 + 1).ToString()).GetComponent <UILabel>().text); } } transform.root.FindChild("Scroll").FindChild("Main").FindChild("PreSetting").GetComponent <PreSettingCommander>() .SetList(presetList); }
void SetName() { //팀 이름 설정 transform.FindChild("Mid").FindChild("BG").FindChild("Team 1").FindChild("Label").GetComponent <UILabel> (). text = transform.root.FindChild("Scroll").FindChild("ContestIn").FindChild("GameInfo") .FindChild("Mid").FindChild("Info").FindChild("L_TeamName").FindChild("Label").GetComponent <UILabel> ().text; transform.FindChild("Mid").FindChild("BG").FindChild("Team 2").FindChild("Label").GetComponent <UILabel> (). text = transform.root.FindChild("Scroll").FindChild("ContestIn").FindChild("GameInfo") .FindChild("Mid").FindChild("Info").FindChild("R_TeamName").FindChild("Label").GetComponent <UILabel> ().text; string Ateam = UtilMgr.GetTeamCode(transform.FindChild("Mid").FindChild("BG").FindChild("Team 1").FindChild("Label").GetComponent <UILabel> (). text.Replace("[b]", "")); string Hteam = UtilMgr.GetTeamCode(transform.FindChild("Mid").FindChild("BG").FindChild("Team 2").FindChild("Label").GetComponent <UILabel> (). text.Replace("[b]", "")); List <GamePresetLineupInfo> List = UserMgr.LineUpList[UserMgr.Schedule.gameSeq.ToString()]; for (int i = 0; i < List.Count; i++) { if (List[i].team == Ateam) { transform.root.FindChild("Scroll").FindChild("ContestIn").FindChild("PreSetting").FindChild("Mid") .FindChild("Scroll View").FindChild("Position").FindChild("Item " + List[i].lineup.ToString()) .FindChild("L_name " + List[i].lineup.ToString()).FindChild("Label") .GetComponent <UILabel>().text = List[i].player; } else if (List[i].team == Hteam) { transform.root.FindChild("Scroll").FindChild("ContestIn").FindChild("PreSetting").FindChild("Mid") .FindChild("Scroll View").FindChild("Position").FindChild("Item " + List[i].lineup.ToString()) .FindChild("R_name " + List[i].lineup.ToString()).FindChild("Label") .GetComponent <UILabel>().text = List[i].player; } } }