using UnityEngine; using UnityEngine.UI; public class OgeePNL : MonoBehaviour { public void StartPNL() { SceneModeManager.Instance.SetSceneMode(SceneModes.Panel);//"pnl"; _G.SC[0] = UIT.Global(Header.Ogee,_G.G).Split('?')[1];//GlobalSelectionManager.GetValue(GlobalOption.OGEE_5).Split('?')[1]; float NO = 16; float maxw = 8; _G.PNLSelect = "OGEEPNL"; DOIT.BTNPNL("TOG1", 100, "MODEL", "OGEE", NO, maxw, "OGEE/"); //SIZE BACKGROUND DOIT.Sizebackground(NO, maxw); DOIT.Sizebackground(NO, maxw); GameObject.Find("MODEL").transform.localPosition = new Vector3(0, 5, 0); float HBG = 140 + (NO / maxw) * 110f; DOIT.OffMODIFYER(); //Category DOIT.BTNCAT("OGEE", 1, "OGEE", "", "", "", "", ""); GameObject.Find("EMPTYLpnl").transform.Find("CATEGORY").transform.localPosition = new Vector3(0, HBG / 2 - 35, 1); //Modifiyer GameObject.Find("EMPTYLpnl").transform.Find("MODIFYER").transform.Find("OGEEGLOBAL").gameObject.SetActive(true); GameObject.Find("EMPTYLpnl").transform.Find("MODIFYER").transform.Find("ColorChart").gameObject.SetActive(true); GameObject.Find("EMPTYLpnl").transform.Find("MODIFYER").transform.localPosition = new Vector3(0, -HBG / 2 + 45, 1); string[] code = UIT.Global(Header.Ogee,_G.G).Split(',');//GlobalSelectionManager.GetValue(GlobalOption.OGEE_5).Split(","[0]); if (SceneModeManager.SelectedName != "") { code = _G.OBJs[Get.GetObjectIndex(SceneModeManager.SelectedName)][64].Split(","[0]); } //Color GameObject.Find(code[2]).GetComponent().isOn = true; DOIT.ColorModel(code[2]); //Shine "DCAB101,2,FFFFFF,r0,SG"; GameObject.Find(code[4]).GetComponent().isOn = true; //Box model GameObject.Find("EMPTYLpnl").transform.Find("MODEL").transform.Find(_G.SC[0]).GetComponent().isOn = true; //Height string hH = code[1]; if (hH == "0") hH = "3"; GameObject.Find("mH").gameObject.GetComponent().text = hH + _G.Sys; } public static void Add() { foreach (Transform c1 in GameObject.Find("ColorChart").transform) { if (c1.GetComponent().isOn == true) { _G.SC[5] = c1.name; } } foreach (Transform sh in GameObject.Find("SHINE").transform) { if (sh.GetComponent().isOn == true) { _G.SC[7] = sh.name; } } string Num = _G.SC[0].Substring(4, 3); string hO = GameObject.Find("mH").gameObject.GetComponent().text; hO = DOIT.CSs(hO); string cc = "OGEE" + Num + ","+ hO+ "," + _G.SC[5] + ",r0," + _G.SC[7]; if (SceneModeManager.SelectedName != "") DOUNIQUE(cc); else DOGLOBAL(cc); //_MOL.SetMolding(); DOIT.CloseALLPNL(); } public static void DOGLOBAL(string cc) { UIT.GlobalSet(Header.Ogee,cc,_G.G);//GlobalSelectionManager.SetValue(GlobalOption.OGEE_5, cc); DOIT.AddtoCodeCabGlobal(64, cc, _G.G); } public static void DOUNIQUE(string cc) { int nO = Get.GetObjectIndex(SceneModeManager.SelectedName); _G.OBJs[nO][60] = "UNIQUE"; _G.OBJs[nO][64] = cc; } public void None() { if (SceneModeManager.SelectedName != "") { int nO = Get.GetObjectIndex(SceneModeManager.SelectedName); string[] CC = _G.OBJs[nO][64].Split(","[0]); string cc = CC[0] + ",0," + CC[2] + "," + CC[3] + "," + CC[4]; print("cc===" + cc); DOUNIQUE(cc); } else { string[] CC = UIT.Global(Header.Ogee,_G.G).Split(',');//GlobalSelectionManager.GetValue(GlobalOption.OGEE_5).Split(","[0]); ; string cc = CC[0] + ",0," + CC[2] + "," + CC[3] + "," + CC[4]; print("cc===" + cc); DOGLOBAL(cc); } //_MOL.SetMolding(); DOIT.CloseALLPNL(); } public void SetGlobal() { DOUNIQUE( UIT.Global(Header.Ogee,_G.G)); //_MOL.SetMolding(); DOIT.CloseALLPNL(); } }