Example #1
0
        /// <summary>
        /// Return the data of the object to save in a persistent object.
        /// </summary>
        /// <returns>A persistent object.</returns>
        public override Persistent GetData()
        {
            var inventory = new InventoryPersistent();

            inventory.items = Data.GetArrayData <ItemPersistent>(items);
            return(inventory);
        }
Example #2
0
 /// <summary>
 /// It get all the persistent data from DiplomataData.
 /// </summary>
 public void Save()
 {
     options       = (OptionsPersistent)DiplomataManager.Data.options.GetData();
     characters    = Data.GetArrayData <CharacterPersistent>(DiplomataManager.Data.characters.ToArray());
     globalFlags   = (GlobalFlagsPersistent)DiplomataManager.Data.globalFlags.GetData();
     interactables = Data.GetArrayData <InteractablePersistent>(DiplomataManager.Data.interactables.ToArray());
     inventory     = (InventoryPersistent)DiplomataManager.Data.inventory.GetData();
     quests        = Data.GetArrayData <QuestPersistent>(DiplomataManager.Data.quests);
     talkLogs      = Data.GetArrayData <TalkLogPersistent>(DiplomataManager.Data.talkLogs);
 }