public override void DrawGUI() { #if UNITY_EDITOR int id = UnityEditor.EditorGUILayout.IntField("Id", Id); if (id != Id) { this.Id = id; this.SetName(); } this.Name = UnityEditor.EditorGUILayout.TextField("Name", Name); int regionID = UnityEditor.EditorGUILayout.IntField("RegionID", RegionID); if (regionID != RegionID) { this.RegionID = regionID; this.DrawScene(); this.SetName(); } this.DestMapID = UnityEditor.EditorGUILayout.IntField("DestMapID", DestMapID); this.DestPos = UnityEditor.EditorGUILayout.Vector3Field("DestPos", DestPos); this.DisplayText = UnityEditor.EditorGUILayout.Toggle("DisplayText", DisplayText); this.CR = (ELvlCR)UnityEditor.EditorGUILayout.EnumPopup("CR", CR); this.OpenLevel = UnityEditor.EditorGUILayout.IntField("OpenLevel", OpenLevel); this.OpenItemID = UnityEditor.EditorGUILayout.IntField("OpenItemID", OpenItemID); this.OpenVIP = UnityEditor.EditorGUILayout.IntField("OpenVIP", OpenVIP); this.m_Region = (LevelRegion)UnityEditor.EditorGUILayout.ObjectField("Region", m_Region, typeof(LevelRegion), true); #endif }
public override void Read(XmlElement os) { this.Id = os.GetInt32("Id"); this.Name = os.GetString("Name"); this.RegionID = os.GetInt32("RegionID"); this.DestMapID = os.GetInt32("DestMapID"); this.DestPos = os.GetVector3("RegionID"); this.DisplayText = os.GetBool("DisplayText"); this.Pos = os.GetVector3("Pos"); this.Euler = os.GetVector3("Euler"); this.CR = (ELvlCR)os.GetInt32("CR"); this.OpenLevel = os.GetInt32("OpenLevel"); this.OpenItemID = os.GetInt32("OpenItemID"); this.OpenVIP = os.GetInt32("OpenVIP"); }
public override void Import(DCFG cfg) { LvlPortal data = cfg as LvlPortal; this.Id = data.Id; this.Name = data.Name; this.RegionID = data.RegionID; this.DestMapID = data.DestMapID; this.DestPos = data.DestPos; this.DisplayText = data.DisplayText; this.CR = data.CR; this.OpenItemID = data.OpenItemID; this.OpenLevel = data.OpenLevel; this.OpenVIP = data.OpenVIP; }