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