private ExampleData LoadExampleData(int index) { currentSheet = "ExampleSheet"; currentRows = dataReader.GetRows(currentSheet); int edId = 0; TryLoadInt (0, "Id", out edId); ExampleData exampleDataObject = new ExampleData(edId); TryLoadString (0, "Name", out exampleDataObject.name); exampleDataObject.levelDatas = new List<ExampleData.LevelData>(); // Level 0 skip exampleDataObject.levelDatas.Add (new ExampleData.LevelData()); int rowNum = currentRows.Count; for (int i = 0; i < rowNum; i++) { ExampleData.LevelData levelDataObject = new ExampleData.LevelData(); TryLoadBigInteger(i, "Coin", out levelDataObject.coin); TryLoadBigInteger(i, "UpgradeCost", out levelDataObject.upgradeCost); exampleDataObject.levelDatas.Add(levelDataObject); } return exampleDataObject; }
private ExampleData LoadExampleData(int index) { currentSheet = "ExampleSheet"; currentRows = dataReader.GetRows(currentSheet); int edId = 0; TryLoadInt(0, "Id", out edId); ExampleData exampleDataObject = new ExampleData(edId); TryLoadString(0, "Name", out exampleDataObject.name); exampleDataObject.levelDatas = new List <ExampleData.LevelData>(); // Level 0 skip exampleDataObject.levelDatas.Add(new ExampleData.LevelData()); int rowNum = currentRows.Count; for (int i = 0; i < rowNum; i++) { ExampleData.LevelData levelDataObject = new ExampleData.LevelData(); TryLoadBigInteger(i, "Coin", out levelDataObject.coin); TryLoadBigInteger(i, "UpgradeCost", out levelDataObject.upgradeCost); exampleDataObject.levelDatas.Add(levelDataObject); } return(exampleDataObject); }