using UnityEngine; using UnityEngine.UI; using UnityEngine.Events; public class FloorPNL : MonoBehaviour { public void StartPNL() { SceneModeManager.Instance.SetSceneMode(SceneModes.Panel);//"PNL"; _G.SC[0] = ""; _G.PNL = "Floor"; int NO = 24; int maxw = 8; DOIT.BTNPNL("TOG1", 100, "MODEL", "CERA", NO, maxw, "FINISH/"); DOIT.Sizebackground(NO, maxw); GameObject.Find("MODEL").transform.localPosition = new Vector3(0, 25, 0); float HBG = 140 + (NO / maxw) * 110f; DOIT.OffMODIFYER(); GameObject.Find("EMPTYLpnl").transform.Find("CATEGORY").gameObject.SetActive(true); //Category DOIT.BTNCAT("FLOOR", 2, "CERAMIC", "WOOD", "", "", "", ""); GameObject.Find("EMPTYLpnl").transform.Find("CATEGORY").transform.localPosition = new Vector3(0, HBG / 2 - 30, 1); //Modifiyer GameObject.Find("EMPTYLpnl").transform.Find("MODIFYER").transform.Find("CERAMIC").gameObject.SetActive(true); GameObject.Find("EMPTYLpnl").transform.Find("MODIFYER").transform.localPosition = new Vector3(0, -HBG / 2 + 50, 1); //Set ON Start print("_G.FLC[3]===" + _G.FLC[3]); GameObject.Find("SIZE").transform.Find(_G.FLC[1]).gameObject.transform.GetComponent().isOn = true; GameObject.Find("CERAMIC/Color/" + _G.FLC[3]).gameObject.GetComponent().isOn = true; GameObject.Find("CERAMIC/ColorG/" + _G.FLC[4]).gameObject.GetComponent().isOn = true; GameObject.Find("ROT").transform.Find(_G.FLC[6]).gameObject.transform.GetComponent().isOn = true; GameObject.Find("SHINE").transform.Find(_G.FLC[7]).gameObject.transform.GetComponent().isOn = true; } public static void Add() { _G.FLC[0] = _G.SC[0]; //SIZE foreach(Transform Size in GameObject.Find("SIZE").transform) { if (Size.GetComponent().isOn == true) { _G.FLC[1] = Size.name; _G.FLC[2] = Size.name; } } //COLOR1 foreach (Transform c1 in GameObject.Find("Color").transform) { print("c1=" + c1.name); if (c1.GetComponent().isOn == true) { _G.FLC[3] = c1.name; } } //COLOR2 if (GameObject.Find("ColorG")) { foreach (Transform c2 in GameObject.Find("ColorG").transform) { if (c2.GetComponent().isOn == true) { _G.FLC[4] = c2.name; } } } //ROTATION foreach (Transform R in GameObject.Find("ROT").transform) { if (R.GetComponent().isOn == true) { _G.FLC[6] = R.name;} } //SHINE foreach (Transform S in GameObject.Find("SHINE").transform) { if (S.GetComponent().isOn == true) { _G.FLC[7] = S.name; } } //_G.FLC[5] = _G.SC[5]; CreateFloor.SetFloor(); DOIT.CloseALLPNL(); SceneModeManager.Instance.SetSceneMode(SceneModes.Navigate); } public void ColorModel() { DOIT.ColorModel(this.name); } }