44 lines
962 B
C#
44 lines
962 B
C#
using MEC;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
public class ExcelDatas
|
|
{
|
|
public Dictionary<long, UnitData> unitData;
|
|
public Dictionary<long, AIData> ai;
|
|
public Dictionary<long, LeaderData> leaderData;
|
|
public Dictionary<long, EquipmentData> equipment;
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerator<float> ToJson(Action action)
|
|
{
|
|
yield return Timing.WaitForSeconds(0);
|
|
foreach (var data in unitData)
|
|
{
|
|
data.Value.toJson();
|
|
}
|
|
yield return Timing.WaitForSeconds(0);
|
|
action();
|
|
}
|
|
|
|
public List<AIData> GamestageAIList(int chapter, int stage)
|
|
{
|
|
List<AIData> data = new List<AIData>();
|
|
foreach (var item in ai)
|
|
{
|
|
if(item.Value.chapter == chapter && item.Value.stage == stage)
|
|
{
|
|
data.Add(item.Value);
|
|
}
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
public abstract class Excel
|
|
{
|
|
public abstract void toJson();
|
|
} |