public override IRestorableComponent saveComponent(GameObject gameObject,
                                                    IComponentAssigner assigner, GamePersistence.SaveType saveType)
 {
     setSaveData(saveType);
     AutomatedScriptTransfer.TransferScriptsSaving(this, savedDictionary, saveType);
     return(CreatedSaveableMonoBehaviour);
 }
Ejemplo n.º 2
0
 public override IRestorableComponent saveComponent(GameObject gameObject,
                                                    IComponentAssigner assigner, GamePersistence.SaveType saveType)
 {
     saveComponentValues(gameObject, assigner, saveType);
     AutomatedScriptTransfer.transferComponentSaving
         (this, CreatedSaveableComponent.DataContainer);
     return(CreatedSaveableComponent);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// loads all static members from saved types
 /// </summary>
 private void LoadStaticData()
 {
     if (savedStaticData != null)
     {
         foreach (KeyValuePair <string, Dictionary <string, object> > classStaticMembers in savedStaticData)
         {
             Type t = Type.GetType(classStaticMembers.Key);
             AutomatedScriptTransfer.RestoreStaticData(classStaticMembers.Value, t);
         }
     }
 }
Ejemplo n.º 4
0
 public void SaveStaticValues()
 {
     savedStaticData = new Dictionary <string, Dictionary <string, object> >();
     foreach (Type t in StaticGameData)
     {
         Dictionary <string, object> dict = new Dictionary <string, object>();
         AutomatedScriptTransfer.TransferStaticScriptsSaving(t, dict, GamePersistence.SaveType.Game);
         string type = t.AssemblyQualifiedName;
         savedStaticData[type] = dict;
     }
 }
 public ISaveableComponent restoreComponent(IComponentAssigner assigner)
 {
     AutomatedScriptTransfer.restoreData(values, createdComponent, LastSerializedType);
     componentRestored(createdComponent, assigner);
     return(createdComponent);
 }