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); }
public ConsumableFarmItemList GetFarmtemsConfig() { return(LoadObjectFromJSON.LoadFromResources <ConsumableFarmItemList>(Path.Combine(configsFolder, farmItemListConfigPath))); }
public ShopItemList GetShopListConfig() { return(LoadObjectFromJSON.LoadFromResources <ShopItemList>(Path.Combine(configsFolder, shopListConfigPath))); }
public ListNaturalResources GetListNaturalResourcesConfig() { return(LoadObjectFromJSON.LoadFromResources <ListNaturalResources>(Path.Combine(configsFolder, resourcesListConfigPath))); }
public Game GetGameStartConfig() { return(LoadObjectFromJSON.LoadFromResources <Game>(Path.Combine(configsFolder, startGameConfigPath))); }