public ScriptSceneObject(ScriptSceneObject SSO, Scene ParentScene) : base(SSO, ParentScene) { this._Enabled = true; this._Script = SSO._Script; this._ScriptType = SSO.ScriptType; this.Type = SceneObjectType.ScriptSceneObject; }
public static ScriptSceneObject Deserialize(string Path) { XmlSerializer Deserializer = new XmlSerializer(typeof(ScriptSceneObject)); TextReader Reader = new StreamReader(Path); ScriptSceneObject CurrentScriptSceneObject = (ScriptSceneObject)Deserializer.Deserialize(Reader); Reader.Close(); return(CurrentScriptSceneObject); }
public static void Serialize(ScriptSceneObject CurrentScriptSceneObject, string Path) { XmlSerializer Serializer = new XmlSerializer(typeof(ScriptSceneObject)); using (TextWriter Writer = new StreamWriter(Path)) { Serializer.Serialize(Writer, CurrentScriptSceneObject); } }