AxibugEmuOnline/AxibugEmuOnline.Client/Assets/Script/UI/GamesUI/RomListMenuItem.cs
2024-11-11 18:18:59 +08:00

34 lines
882 B
C#

using AxibugEmuOnline.Client.ClientCore;
using AxibugEmuOnline.Client.UI;
using Codice.Client.Common;
using System;
using UnityEngine;
namespace AxibugEmuOnline.Client
{
public class RomListMenuItem : VirtualSubMenuItem
{
[SerializeField]
protected EnumPlatform Platform;
private RomLib RomLib
{
get
{
switch (Platform)
{
case EnumPlatform.NES:
return App.nesRomLib;
default:
throw new System.NotImplementedException($"δʵÏÖµÄƽ̨ {Platform}");
}
}
}
protected override void GetVirtualListDatas(Action<object> datas)
{
RomLib.FetchRomCount((roms) => datas.Invoke(roms));
}
}
}