Excel 코드 수정
This commit is contained in:
parent
e04fc50fb6
commit
a2796087f1
|
@ -8,17 +8,6 @@ public class Excel
|
|||
private List<Sheet> datas;
|
||||
public List<Sheet> getDatas { get { return datas; } }
|
||||
|
||||
// 좀더 고도화가 필요함.
|
||||
//public Sheet findSheet(string sheetName) {
|
||||
// int index = datas.FindIndex(n => n.name == sheetName);
|
||||
// if(index == -1)
|
||||
// {
|
||||
// Debug.Log("null exception");
|
||||
// return null;
|
||||
// }
|
||||
// return datas[index];
|
||||
//}
|
||||
|
||||
#region Dynamic
|
||||
//이러한 형태로 사용할것
|
||||
public Dynamic dynamic;
|
||||
|
@ -57,12 +46,11 @@ public class Excel
|
|||
}
|
||||
#endregion
|
||||
|
||||
public Excel()
|
||||
public Excel(List<string> fileNames)
|
||||
{
|
||||
ExcelManager excel = new ExcelManager();
|
||||
|
||||
//Dynamic, Unit
|
||||
excel.Add("Datas.xlsx");
|
||||
excel.Add(fileNames);
|
||||
|
||||
datas = excel.Play();
|
||||
|
||||
|
@ -116,10 +104,14 @@ public class Excel
|
|||
_sheets = new List<Sheet>();
|
||||
readList = new List<string>();
|
||||
}
|
||||
public void Add(string file)
|
||||
|
||||
public void Add(List<string> files)
|
||||
{
|
||||
foreach (string file in files)
|
||||
{
|
||||
readList.Add(path + file);
|
||||
}
|
||||
}
|
||||
|
||||
public List<Sheet> Play()
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class GameManager : DontDestroy<GameManager>
|
||||
|
@ -11,7 +12,10 @@ public class GameManager : DontDestroy<GameManager>
|
|||
{
|
||||
Application.targetFrameRate = 120;
|
||||
nowScene = eScene.Title;
|
||||
excel = new Excel();
|
||||
//Datas.xlsx
|
||||
// Dynamic
|
||||
// Unit
|
||||
excel = new Excel(new List<string>() {"Datas.xlsx"});
|
||||
|
||||
//사용법
|
||||
//Debug.Log(excel.dynamic.selectVelue("maxSwingCount"));
|
||||
|
|
Loading…
Reference in New Issue