コード例 #1
0
 public ScriptSceneObject(ScriptSceneObject SSO, Scene ParentScene) : base(SSO, ParentScene)
 {
     this._Enabled    = true;
     this._Script     = SSO._Script;
     this._ScriptType = SSO.ScriptType;
     this.Type        = SceneObjectType.ScriptSceneObject;
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        public static void Serialize(ScriptSceneObject CurrentScriptSceneObject, string Path)
        {
            XmlSerializer Serializer = new XmlSerializer(typeof(ScriptSceneObject));

            using (TextWriter Writer = new StreamWriter(Path))
            {
                Serializer.Serialize(Writer, CurrentScriptSceneObject);
            }
        }