Super Knight : Enter the Dungeon
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
[System.Serializable]
|
|
|
|
|
public class AppearList
|
|
|
|
|
{
|
|
|
|
|
public string idx;
|
|
|
|
|
public int cnt;
|
|
|
|
|
public List<string> mobNames = new List<string>();
|
|
|
|
|
|
|
|
|
|
public AppearList()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public AppearList(string[] spl)
|
|
|
|
|
{
|
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
|
|
idx = spl[i++];
|
|
|
|
|
cnt = int.Parse(spl[i++]);
|
|
|
|
|
|
|
|
|
|
for(; i < spl.Length; i++)
|
|
|
|
|
{
|
|
|
|
|
if (1 < spl[i].Length)
|
|
|
|
|
mobNames.Add(spl[i]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[System.Serializable]
|
|
|
|
|
public class DataMonsterAppear : IData
|
|
|
|
|
{
|
|
|
|
|
Dictionary<string, AppearList> apper;
|
|
|
|
|
public List<AppearList> items;
|
|
|
|
|
|
|
|
|
|
public override void TableLoad()
|
|
|
|
|
{
|
|
|
|
|
string[] strLine = FileLoadWithLineSplit(path == string.Empty ? "CSV/MonsterAppear" : path);
|
|
|
|
|
string[] spl;
|
|
|
|
|
|
|
|
|
|
apper = new Dictionary<string, AppearList>();
|
|
|
|
|
for (int i = 1; i < strLine.Length; i++)
|
|
|
|
|
{
|
|
|
|
|
if (1 < strLine[i].Length)
|
|
|
|
|
{
|
|
|
|
|
spl = strLine[i].Split(',');
|
|
|
|
|
apper.Add(spl[0], new AppearList(spl));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
items = new List<AppearList>(apper.Values);
|
|
|
|
|
}
|
|
|
|
|
public override void LoadedCheck()
|
|
|
|
|
{
|
|
|
|
|
if (apper == null)
|
|
|
|
|
TableLoad();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public AppearList AppearListGet(string idx)
|
|
|
|
|
{
|
|
|
|
|
LoadedCheck();
|
|
|
|
|
|
|
|
|
|
if (apper.ContainsKey(idx))
|
|
|
|
|
return apper[idx];
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
public List<AppearList> AppearsListGet(List<string> idxs)
|
|
|
|
|
{
|
|
|
|
|
LoadedCheck();
|
|
|
|
|
|
|
|
|
|
List<AppearList> list = new List<AppearList>();
|
|
|
|
|
for (int i = 0; i < idxs.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
AppearList data = AppearListGet(idxs[i]);
|
|
|
|
|
if (data != null)
|
|
|
|
|
list.Add(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
}
|