Beispiel #1
0
 private void SerializeMe(object sender, CustomSceneSerializationArgs args)
 {
     if (args.CustomSceneObjects.IsSaving)
     {
         // Save our settings object in the vForge scene file
         args.CustomSceneObjects.AddObject("SimpleCustomSaveScenePlugin.EditorPlugin", _additionalGameData);
     }
     else
     {
         // Retrieve our settings from the scene file (if available)
         AdditionalGameData loadedData = args.CustomSceneObjects.FindObject(
             "SimpleCustomSaveScenePlugin.EditorPlugin", typeof(AdditionalGameData)) as AdditionalGameData;
         if (loadedData != null)
         {
             _additionalGameData = loadedData;
         }
     }
 }
 private void SerializeMe(object sender, CustomSceneSerializationArgs args)
 {
     if (args.CustomSceneObjects.IsSaving)
       {
     // Save our settings object in the vForge scene file
     args.CustomSceneObjects.AddObject("SimpleCustomSaveScenePlugin.EditorPlugin", _additionalGameData);
       }
       else
       {
     // Retrieve our settings from the scene file (if available)
     AdditionalGameData loadedData = args.CustomSceneObjects.FindObject(
       "SimpleCustomSaveScenePlugin.EditorPlugin", typeof(AdditionalGameData)) as AdditionalGameData;
     if (loadedData != null)
       _additionalGameData = loadedData;
       }
 }