add LiveSheet Support

This commit is contained in:
1605296300@qq.com
2022-09-03 13:55:00 +08:00
parent aebef9b584
commit 8eafe19956
17 changed files with 2056 additions and 1608 deletions
+32
View File
@@ -12,16 +12,24 @@ public class UmaViewerMain : MonoBehaviour
private UmaViewerUI UI => UmaViewerUI.Instance;
private UmaViewerBuilder Builder => UmaViewerBuilder.Instance;
public JArray UmaCharaData;
public JArray UmaLiveData;
public List<CharaEntry> Characters = new List<CharaEntry>();
public List<LiveEntry> Lives = new List<LiveEntry>();
public List<UmaDatabaseEntry> AbList = new List<UmaDatabaseEntry>();
[Header("Asset Memory")]
public bool ShadersLoaded = false;
public Dictionary<string, AssetBundle> LoadedBundles = new Dictionary<string, AssetBundle>();
enum Test
{
a,b,c,d
}
private void Awake()
{
Application.targetFrameRate = -1;
Instance = this;
AbList = UmaDatabaseController.Instance.MetaEntries.ToList();
@@ -50,6 +58,23 @@ public class UmaViewerMain : MonoBehaviour
UI.LoadPropPanel();
UI.LoadMapPanel();
});
yield return UmaViewerDownload.DownloadText("https://www.tracenacademy.com/api/BasicLiveDataInfo", txt =>
{
UmaLiveData = JArray.Parse(txt);
foreach (var item in UmaLiveData)
{
if (!Lives.Where(c => c.MusicId == (int)item["musicId"]).Any())
{
Lives.Add(new LiveEntry()
{
MusicId = (int)item["musicId"],
songName = (string)item["songName"]
});
}
}
UI.LoadLivePanels();
});
}
public void OpenUrl(string url)
@@ -63,4 +88,11 @@ public class UmaViewerMain : MonoBehaviour
public string Name;
public int Id;
}
[System.Serializable]
public class LiveEntry
{
public int MusicId;
public string songName;
}
}