using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using System.Globalization; public class MoldingSetting : MonoBehaviour { //public void sens() //{ // if (this.name == "0") // { // print("Vertical"); // rotate(0); // } // if (this.name == "90") // { // print("Horizontal"); // rotate(90); // } //} public static void Rotate(float R) { GameObject list = Get.o3("TEXTCOL", "Viewport", "Contenttexcol"); List texlist = new List(); for (int i = 0; i < list.transform.childCount; i++) { list.transform.GetChild(i).transform.Find("Background").localRotation = Quaternion.Euler(new Vector3(0, 0, R)); } } //public static void rotate(float R) //{ // GameObject list = Get.o3("TEXTCOL", "Viewport", "Contenttexcol"); // List texlist = new List(); // for (int i = 0; i < list.transform.childCount; i++) // { // list.transform.GetChild(i).transform.Find("Background").localRotation = Quaternion.Euler(new Vector3(0, 0, R)); // } // string CODE = Get.o1("MOLDINGpnl/SHOW/DES/code").GetComponent().text; // string Cs = Get.csvvalue(CODE, _G.LibraryCabTextures, 13); // string Rs = Get.csvvalue(CODE, _G.LibraryCabTextures, 10); // Get.o3("SHOW", "IMAGE", "Image").GetComponent().sprite = CREATE.SPRITETEXTURE(CODE, R.ToString(CultureInfo.InvariantCulture), 256, 256); //} public void NoneClick() { if (SceneModeManager.SelectedName != "") DOUNIQUE("NONE"); else DOGLOBAL("NONE"); } public static void DOGLOBAL(string CODE) { if (_G.PNL == "KickPnl") { print("CODE====" + CODE); string Rs = Get.TogOn(Get.o1("SENS")).name; string value = CODE + "?" + Rs + "?" + _G.caKH; UIT.GlobalSet(Header.KnobH,value,_G.G);//GlobalSelectionManager.SetValue(GlobalOption.KICK_3, value); DOIT.AddtoCodeCabGlobal(63, value, _G.G); } if (_G.PNL == "OgeePnl") { string value = "NONE?0?6?0"; UIT.GlobalSet(Header.Ogee,value,_G.G);//GlobalSelectionManager.SetValue(GlobalOption.OGEE_5, value); DOIT.AddtoCodeCabGlobal(64, value, _G.G); } DOIT.REDOALLCab_G(); _MOL.SetMolding(); GameObject.Find("PNL").transform.Find("GLOBALGPNL").gameObject.SetActive(true); GLOBALSELECTION_PNL.StartPNL(_G.G); } public static void DOUNIQUE(string cc) { int nO = Get.GetObjectIndex(SceneModeManager.SelectedName); _G.OBJs[nO][60] = "UNIQUE"; _G.OBJs[nO][66] = cc; DOIT.REDOCAB(nO); DOIT.CloseALLPNL(); } }