using UnityEngine; using System.Globalization; public class CreateDoor : MonoBehaviour { public static void AddDoor() { float w = DOIT.ConvertStringToNumber(_G.SC[1]); float h = DOIT.ConvertStringToNumber(_G.SC[2]); float d = 6; float os = 0f; float px = DOIT.GetScenePos("px", os); float py = -_G.HEIGHT / 2 + h / 2;//Floor to button float pz = DOIT.GetScenePos("pz", os); float rx = DOIT.GetScenePos("rx", os); float ry = DOIT.GetScenePos("ry", os); float rz = DOIT.GetScenePos("rz", os); string PLR = "R";//position Left or Right string name = "door" + _G.OBJnum.ToString(); SceneModeManager.SelectedName = name; _G.OBJs[_G.OBJnum] = new string[100]; string[] C = _G.OBJs[_G.OBJnum]; C[0] = name; C[1] = _G.SC[0];//Model C[2] = "Door";//Category C[3] = "UNLOCK"; //lock or unlock C[4] = "Door";//Category C[6] = w.ToString(); C[7] = h.ToString(); C[8] = d.ToString(); C[13] = os.ToString(); C[14] = px.ToString() + "," + py.ToString() + "," + pz.ToString(); C[15] = px.ToString(); //pos X C[16] = py.ToString(); //pos Y C[17] = pz.ToString(); //pos Z C[18] = rx.ToString(); //rot X C[19] = ry.ToString(); //rot Y C[20] = rz.ToString(); //rot Z C[21] = _G.ff; //dis from floor C[22] = PAINT.SEL; //dis from floor C[23] = PLR; C[28] = os.ToString(); C[60] = _G.SC[0]; //frame C[61] = _G.SC[61]; //Molding C[62] = _G.SC[62]; //Color door C[63] = _G.SC[63]; //Color frame & molding C[89] = C[0];//Groupe string ConstructDoor.AddDoor(_G.OBJnum); _G.OBJnum += 1; } }