Пример #1
0
 /// <summary>
 /// Restore full resource save data including resource specific data.
 /// </summary>
 public void RestoreResourceSaveData(ResourceSaveData_v1 data)
 {
     symbol           = data.symbol;
     infoMessageID    = data.infoMessageID;
     usedMessageID    = data.usedMessageID;
     hasPlayerClicked = data.hasPlayerClicked;
     isHidden         = data.isHidden;
     RestoreSaveData(data.resourceSpecific);
 }
Пример #2
0
        /// <summary>
        /// Get full resource save data including resource specific data.
        /// </summary>
        public ResourceSaveData_v1 GetResourceSaveData()
        {
            ResourceSaveData_v1 resourceData = new ResourceSaveData_v1();

            resourceData.type             = GetType();
            resourceData.symbol           = symbol;
            resourceData.infoMessageID    = infoMessageID;
            resourceData.usedMessageID    = usedMessageID;
            resourceData.hasPlayerClicked = hasPlayerClicked;
            resourceData.isHidden         = isHidden;
            resourceData.resourceSpecific = GetSaveData();

            return(resourceData);
        }