Пример #1
0
        public void RestoreSaveData(DecoratorSaveData saveData)
        {
            DestroyPlacedObjects();

            if (saveData.playerHome != null)
            {
                playerHomeObjects = saveData.playerHome;
            }
            else
            {
                playerHomeObjects = null;
            }

            if (saveData.playerShip != null)
            {
                playerShipObjects = saveData.playerShip;
            }
            else
            {
                playerShipObjects = null;
            }

            if (saveData.playerShipExterior != null)
            {
                playerShipObjectsExterior = saveData.playerShipExterior;
            }
            else
            {
                playerShipObjectsExterior = null;
            }
        }
Пример #2
0
        public DecoratorSaveData GetSaveData()
        {
            DecoratorSaveData saveData = new DecoratorSaveData();

            SetData();

            saveData.playerHome         = playerHomeObjects;
            saveData.playerShip         = playerShipObjects;
            saveData.playerShipExterior = playerShipObjectsExterior;

            return(saveData);
        }