public Game Load()
        {
            string gameSavePath = Path.Combine(Application.persistentDataPath, "game.json");

            ConfigController configController = new ConfigController();
            Game             startGame        = configController.GetGameStartConfig();

            Game loadGame = LoadObjectFromJSON.Load <Game>(gameSavePath);

            if (loadGame != null)
            {
                return(loadGame);
            }

            return(startGame);
        }
Exemple #2
0
 public ConsumableFarmItemList GetFarmtemsConfig()
 {
     return(LoadObjectFromJSON.LoadFromResources <ConsumableFarmItemList>(Path.Combine(configsFolder,
                                                                                       farmItemListConfigPath)));
 }
Exemple #3
0
 public ShopItemList GetShopListConfig()
 {
     return(LoadObjectFromJSON.LoadFromResources <ShopItemList>(Path.Combine(configsFolder, shopListConfigPath)));
 }
Exemple #4
0
 public ListNaturalResources GetListNaturalResourcesConfig()
 {
     return(LoadObjectFromJSON.LoadFromResources <ListNaturalResources>(Path.Combine(configsFolder,
                                                                                     resourcesListConfigPath)));
 }
Exemple #5
0
 public Game GetGameStartConfig()
 {
     return(LoadObjectFromJSON.LoadFromResources <Game>(Path.Combine(configsFolder, startGameConfigPath)));
 }