forked from sin365/AxibugEmuOnline
Game_NES 改名RomListMenuItem 更通用
This commit is contained in:
parent
e90d74e63c
commit
e6dd0ec952
@ -7,12 +7,29 @@ using App = AxibugEmuOnline.Client.ClientCore.App;
|
|||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
namespace AxibugEmuOnline.Client
|
||||||
{
|
{
|
||||||
public class Game_NES : MenuItem
|
public class RomListMenuItem : MenuItem
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
CanvasGroup RomGroupRoot;
|
CanvasGroup RomGroupRoot;
|
||||||
|
[SerializeField]
|
||||||
|
EnumPlatform Platform;
|
||||||
|
|
||||||
private TweenerCore<float, float, FloatOptions> m_showTween;
|
private TweenerCore<float, float, FloatOptions> m_showTween;
|
||||||
|
|
||||||
|
private RomLib RomLib
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
switch (Platform)
|
||||||
|
{
|
||||||
|
case EnumPlatform.NES:
|
||||||
|
return App.nesRomLib;
|
||||||
|
default:
|
||||||
|
throw new System.NotImplementedException($"δʵÏÖµÄƽ̨ {Platform}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override void Awake()
|
protected override void Awake()
|
||||||
{
|
{
|
||||||
base.Awake();
|
base.Awake();
|
||||||
@ -54,7 +71,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot;
|
var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot;
|
||||||
thirdMenuGroup.itemGroup.Clear();
|
thirdMenuGroup.itemGroup.Clear();
|
||||||
App.nesRomLib.FetchRomCount((roms) =>
|
RomLib.FetchRomCount((roms) =>
|
||||||
{
|
{
|
||||||
var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot;
|
var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot;
|
||||||
thirdMenuGroup.itemGroup.UpdateDependencyProperty(thirdMenuGroup);
|
thirdMenuGroup.itemGroup.UpdateDependencyProperty(thirdMenuGroup);
|
Loading…
Reference in New Issue
Block a user