Compare commits
No commits in common. "1c589ac3bee1ca7d9eca3698b9803962d0c724dc" and "b66df94086d483bf98e4b5233f8266129cab3753" have entirely different histories.
1c589ac3be
...
b66df94086
@ -6,15 +6,12 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
public interface IEmuCore
|
public interface IEmuCore
|
||||||
{
|
{
|
||||||
GameObject gameObject { get; }
|
|
||||||
|
|
||||||
object GetState();
|
object GetState();
|
||||||
byte[] GetStateBytes();
|
byte[] GetStateBytes();
|
||||||
void LoadState(object state);
|
void LoadState(object state);
|
||||||
void LoadStateFromBytes(byte[] data);
|
void LoadStateFromBytes(byte[] data);
|
||||||
void Pause();
|
void Pause();
|
||||||
void Resume();
|
void Resume();
|
||||||
void SetupScheme();
|
void SetupScheme();
|
||||||
void StartGame(RomFile romFile);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using AxibugEmuOnline.Client.ClientCore;
|
using AxibugEmuOnline.Client.ClientCore;
|
||||||
using MyNes.Core;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client.Manager
|
namespace AxibugEmuOnline.Client.Manager
|
||||||
@ -7,7 +6,6 @@ namespace AxibugEmuOnline.Client.Manager
|
|||||||
public class AppEmu
|
public class AppEmu
|
||||||
{
|
{
|
||||||
private GameObject m_emuInstance;
|
private GameObject m_emuInstance;
|
||||||
private IEmuCore m_emuCore;
|
|
||||||
|
|
||||||
public void BeginGame(RomFile romFile)
|
public void BeginGame(RomFile romFile)
|
||||||
{
|
{
|
||||||
@ -16,17 +14,14 @@ namespace AxibugEmuOnline.Client.Manager
|
|||||||
switch (romFile.Platform)
|
switch (romFile.Platform)
|
||||||
{
|
{
|
||||||
case EnumPlatform.NES:
|
case EnumPlatform.NES:
|
||||||
m_emuCore = GameObject.Instantiate(Resources.Load<GameObject>("NES/NesEmulator")).GetComponent<IEmuCore>();
|
var nesEmu = GameObject.Instantiate(Resources.Load<GameObject>("NES/NesEmulator")).GetComponent<NesEmulator>();
|
||||||
|
m_emuInstance = nesEmu.gameObject;
|
||||||
|
|
||||||
|
nesEmu.StartGame(romFile);
|
||||||
|
LaunchUI.Instance.HideMainMenu();
|
||||||
|
InGameUI.Instance.Show(romFile, nesEmu);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_emuInstance = m_emuCore.gameObject;
|
|
||||||
|
|
||||||
m_emuCore.StartGame(romFile);
|
|
||||||
LaunchUI.Instance.HideMainMenu();
|
|
||||||
InGameUI.Instance.Show(romFile, m_emuCore);
|
|
||||||
|
|
||||||
m_emuCore.SetupScheme();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StopGame()
|
public void StopGame()
|
||||||
@ -37,8 +32,6 @@ namespace AxibugEmuOnline.Client.Manager
|
|||||||
|
|
||||||
InGameUI.Instance.Hide();
|
InGameUI.Instance.Hide();
|
||||||
LaunchUI.Instance.ShowMainMenu();
|
LaunchUI.Instance.ShowMainMenu();
|
||||||
|
|
||||||
ControlScheme.Current = ControlSchemeSetts.Normal;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ namespace AxibugEmuOnline.Client.Manager
|
|||||||
List<Protobuf_Room_MiniInfo> result = new List<Protobuf_Room_MiniInfo>();
|
List<Protobuf_Room_MiniInfo> result = new List<Protobuf_Room_MiniInfo>();
|
||||||
foreach (var item in dictRoomListID2Info)
|
foreach (var item in dictRoomListID2Info)
|
||||||
{
|
{
|
||||||
result.Add(item.Value);
|
result.Add(new Protobuf_Room_MiniInfo());
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -204,12 +204,12 @@ namespace AxibugEmuOnline.Client.Manager
|
|||||||
if (msg.UpdateType == 0)
|
if (msg.UpdateType == 0)
|
||||||
{
|
{
|
||||||
AddOrUpdateRoomList(msg.RoomMiniInfo);
|
AddOrUpdateRoomList(msg.RoomMiniInfo);
|
||||||
Eventer.Instance.PostEvent(EEvent.OnRoomListSingleUpdate, msg.RoomMiniInfo.RoomID);
|
Eventer.Instance.PostEvent(EEvent.OnRoomListSingleUpdate, msg.RoomMiniInfo.GameRomID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RemoveRoomList(msg.RoomMiniInfo.RoomID);
|
RemoveRoomList(msg.RoomMiniInfo.GameRomID);
|
||||||
Eventer.Instance.PostEvent(EEvent.OnRoomListSingleClose, msg.RoomMiniInfo.RoomID);
|
Eventer.Instance.PostEvent(EEvent.OnRoomListSingleClose, msg.RoomMiniInfo.GameRomID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,12 +74,8 @@ namespace AxibugEmuOnline.Client
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//键位映射表需要在按键响应的堆栈结束后处理,防止迭代器修改问题
|
|
||||||
if (m_waitMapperSetting != null)
|
if (m_waitMapperSetting != null)
|
||||||
{
|
|
||||||
m_keyMapper = m_waitMapperSetting;
|
m_keyMapper = m_waitMapperSetting;
|
||||||
m_waitMapperSetting = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Dictionary<KeyCode, EnumCommand> m_waitMapperSetting = null;
|
private Dictionary<KeyCode, EnumCommand> m_waitMapperSetting = null;
|
||||||
|
@ -12,7 +12,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
public override bool Enable => gameObject.activeInHierarchy;
|
public override bool Enable => gameObject.activeInHierarchy;
|
||||||
|
|
||||||
/// <summary> 指示该游戏实例是否处于联网模式 </summary>
|
/// <summary> 指示该游戏实例是否处于联网模式 </summary>
|
||||||
public bool IsOnline => App.user.IsLoggedIn ? App.roomMgr.RoomState > AxibugProtobuf.RoomGameState.OnlyHost : false;
|
public bool IsOnline => App.roomMgr.RoomState > AxibugProtobuf.RoomGameState.OnlyHost;
|
||||||
|
|
||||||
private RomFile m_rom;
|
private RomFile m_rom;
|
||||||
public IEmuCore Core { get; private set; }
|
public IEmuCore Core { get; private set; }
|
||||||
@ -57,7 +57,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
public void Show(RomFile currentRom, IEmuCore core)
|
public void Show(RomFile currentRom, IEmuCore core)
|
||||||
{
|
{
|
||||||
m_state = null;//清空游戏快照
|
|
||||||
CommandDispatcher.Instance.RegistController(this);
|
CommandDispatcher.Instance.RegistController(this);
|
||||||
|
|
||||||
m_rom = currentRom;
|
m_rom = currentRom;
|
||||||
@ -70,7 +69,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
}
|
}
|
||||||
|
|
||||||
Eventer.Instance.RegisterEvent<int>(EEvent.OnRoomWaitStepChange, OnServerStepUpdate);
|
Eventer.Instance.RegisterEvent<int>(EEvent.OnRoomWaitStepChange, OnServerStepUpdate);
|
||||||
OptionUI.Instance.OnHide += PopMenu_OnHide;
|
|
||||||
|
|
||||||
gameObject.SetActiveEx(true);
|
gameObject.SetActiveEx(true);
|
||||||
}
|
}
|
||||||
@ -84,28 +82,14 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
CommandDispatcher.Instance.UnRegistController(this);
|
CommandDispatcher.Instance.UnRegistController(this);
|
||||||
|
|
||||||
OptionUI.Instance.OnHide -= PopMenu_OnHide;
|
|
||||||
gameObject.SetActiveEx(false);
|
gameObject.SetActiveEx(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnCmdOptionMenu()
|
protected override void OnCmdOptionMenu()
|
||||||
{
|
{
|
||||||
OptionUI.Instance.Pop(menus);
|
OptionUI.Instance.Pop(menus);
|
||||||
|
|
||||||
if (!IsOnline)//单人模式暂停模拟器
|
|
||||||
{
|
|
||||||
Core.Pause();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//菜单关闭时候
|
|
||||||
private void PopMenu_OnHide()
|
|
||||||
{
|
|
||||||
if (!IsOnline)//单人模式恢复模拟器的暂停
|
|
||||||
Core.Resume();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void QuitGame()
|
public void QuitGame()
|
||||||
{
|
{
|
||||||
Eventer.Instance.UnregisterEvent<int>(EEvent.OnRoomWaitStepChange, OnServerStepUpdate);
|
Eventer.Instance.UnregisterEvent<int>(EEvent.OnRoomWaitStepChange, OnServerStepUpdate);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using AxibugEmuOnline.Client.ClientCore;
|
using AxibugEmuOnline.Client.ClientCore;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using VirtualNes.Core;
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
namespace AxibugEmuOnline.Client
|
||||||
{
|
{
|
||||||
@ -15,14 +16,10 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
public override void OnExcute()
|
public override void OnExcute()
|
||||||
{
|
{
|
||||||
object state = m_gameUI.GetQuickState();
|
|
||||||
Stopwatch sw = Stopwatch.StartNew();
|
Stopwatch sw = Stopwatch.StartNew();
|
||||||
if (state != null)
|
m_gameUI.Core.LoadState(m_gameUI.GetQuickState());
|
||||||
{
|
sw.Stop();
|
||||||
m_gameUI.Core.LoadState(state);
|
App.log.Info($"{m_gameUI.RomFile.Platform}====>快照加载耗时:{sw.Elapsed.TotalMilliseconds}ms");
|
||||||
sw.Stop();
|
|
||||||
App.log.Info($"{m_gameUI.RomFile.Platform}====>快照加载耗时:{sw.Elapsed.TotalMilliseconds}ms");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -517,7 +517,6 @@ public class ItemPresent : GridLayoutGroup, IVirtualLayout
|
|||||||
}
|
}
|
||||||
public RectTransform GetItemUIIfExist(int index)
|
public RectTransform GetItemUIIfExist(int index)
|
||||||
{
|
{
|
||||||
if (index < 0) return null;
|
|
||||||
if (children.Count <= index) return null;
|
if (children.Count <= index) return null;
|
||||||
|
|
||||||
var proxy = children[index];
|
var proxy = children[index];
|
||||||
|
@ -37,11 +37,6 @@ namespace AxibugEmuOnline.Client.UI
|
|||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnDestroy()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetData(MenuData data)
|
public void SetData(MenuData data)
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
|
@ -24,8 +24,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
private bool m_bPoped = false;
|
private bool m_bPoped = false;
|
||||||
private List<OptionUI_MenuItem> m_runtimeMenuItems = new List<OptionUI_MenuItem>();
|
private List<OptionUI_MenuItem> m_runtimeMenuItems = new List<OptionUI_MenuItem>();
|
||||||
|
|
||||||
public event Action OnHide;
|
|
||||||
|
|
||||||
private int m_selectIndex = -1;
|
private int m_selectIndex = -1;
|
||||||
public int SelectIndex
|
public int SelectIndex
|
||||||
{
|
{
|
||||||
@ -180,8 +178,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
m_bPoped = false;
|
m_bPoped = false;
|
||||||
|
|
||||||
ControlScheme.Current = m_lastCS;
|
ControlScheme.Current = m_lastCS;
|
||||||
|
|
||||||
OnHide?.Invoke();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using AxibugEmuOnline.Client.ClientCore;
|
using AxibugEmuOnline.Client.ClientCore;
|
||||||
using AxibugEmuOnline.Client.Event;
|
|
||||||
using AxibugEmuOnline.Client.UI;
|
using AxibugEmuOnline.Client.UI;
|
||||||
using AxibugProtobuf;
|
using AxibugProtobuf;
|
||||||
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
@ -21,55 +21,28 @@ namespace AxibugEmuOnline.Client
|
|||||||
private RomFile m_romFile;
|
private RomFile m_romFile;
|
||||||
|
|
||||||
public int Index { get; set; }
|
public int Index { get; set; }
|
||||||
public int roomID { get; private set; }
|
|
||||||
|
|
||||||
protected override void Awake()
|
|
||||||
{
|
|
||||||
base.Awake();
|
|
||||||
|
|
||||||
Eventer.Instance.RegisterEvent<int>(EEvent.OnRoomListSingleUpdate, OnRoomSingleUpdate);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnDestroy()
|
|
||||||
{
|
|
||||||
Eventer.Instance.UnregisterEvent<int>(EEvent.OnRoomListSingleUpdate, OnRoomSingleUpdate);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnRoomSingleUpdate(int roomId)
|
|
||||||
{
|
|
||||||
if (roomId != roomID) return;
|
|
||||||
|
|
||||||
if (App.roomMgr.GetRoomListMiniInfo(roomId, out var roomInfo))
|
|
||||||
{
|
|
||||||
UpdateUI(roomInfo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetData(object data)
|
public void SetData(object data)
|
||||||
{
|
{
|
||||||
var roomInfo = data as Protobuf_Room_MiniInfo;
|
if (data is Protobuf_Room_MiniInfo roomInfo)
|
||||||
roomID = roomInfo.RoomID;
|
|
||||||
|
|
||||||
UpdateUI(roomInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateUI(Protobuf_Room_MiniInfo roomInfo)
|
|
||||||
{
|
|
||||||
var hostNick = roomInfo.GetHostNickName();
|
|
||||||
roomInfo.GetRoomPlayers(out var cur, out var max);
|
|
||||||
SetBaseInfo(string.Empty, $"<b>{hostNick}</b>µÄ·¿¼ä - {cur}/{max}");
|
|
||||||
SetIcon(null);
|
|
||||||
|
|
||||||
roomInfo.FetchRomFileInRoomInfo(EnumPlatform.NES, (romFile) =>
|
|
||||||
{
|
{
|
||||||
m_romFile = romFile;
|
var hostNick = roomInfo.GetHostNickName();
|
||||||
|
roomInfo.GetRoomPlayers(out var cur, out var max);
|
||||||
|
SetBaseInfo(string.Empty, $"<b>{hostNick}</b>ľÄˇżźä - {cur}/{max}");
|
||||||
|
SetIcon(null);
|
||||||
|
|
||||||
if (romFile.ID == roomInfo.GameRomID)
|
roomInfo.FetchRomFileInRoomInfo(EnumPlatform.NES, (romFile) =>
|
||||||
Txt.text = romFile.Alias;
|
{
|
||||||
|
m_romFile = romFile;
|
||||||
|
|
||||||
UpdateRomInfoView();
|
if (romFile.ID == roomInfo.GameRomID)
|
||||||
App.CacheMgr.GetSpriteCache(romFile.ImageURL, OnGetRomImage);
|
Txt.text = romFile.Alias;
|
||||||
});
|
|
||||||
|
UpdateRomInfoView();
|
||||||
|
App.CacheMgr.GetSpriteCache(romFile.ImageURL, OnGetRomImage);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
@ -1,61 +1,34 @@
|
|||||||
using AxibugEmuOnline.Client.ClientCore;
|
using AxibugEmuOnline.Client.ClientCore;
|
||||||
using AxibugEmuOnline.Client.Event;
|
using AxibugProtobuf;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
namespace AxibugEmuOnline.Client
|
||||||
{
|
{
|
||||||
public class RoomListMenuItem : VirtualSubMenuItem
|
public class RoomListMenuItem : VirtualSubMenuItem
|
||||||
{
|
{
|
||||||
bool m_entering;
|
|
||||||
|
|
||||||
protected override void Awake()
|
|
||||||
{
|
|
||||||
Eventer.Instance.RegisterEvent<int>(EEvent.OnRoomListAllUpdate, OnRoomListUpdateAll);
|
|
||||||
Eventer.Instance.RegisterEvent<int>(EEvent.OnRoomListSingleClose, OnRoomClosed);
|
|
||||||
base.Awake();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
protected override void OnDestroy()
|
|
||||||
{
|
|
||||||
Eventer.Instance.UnregisterEvent<int>(EEvent.OnRoomListAllUpdate, OnRoomListUpdateAll);
|
|
||||||
Eventer.Instance.UnregisterEvent<int>(EEvent.OnRoomListSingleClose, OnRoomClosed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool OnEnterItem()
|
|
||||||
{
|
|
||||||
var res = base.OnEnterItem();
|
|
||||||
if (res) m_entering = true;
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool OnExitItem()
|
|
||||||
{
|
|
||||||
var res = base.OnExitItem();
|
|
||||||
if (res) m_entering = false;
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnRoomListUpdateAll(int obj)
|
|
||||||
{
|
|
||||||
if (m_entering)
|
|
||||||
{
|
|
||||||
RefreshUI();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void OnRoomClosed(int obj)
|
|
||||||
{
|
|
||||||
if (m_entering)
|
|
||||||
{
|
|
||||||
RefreshUI();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void GetVirtualListDatas(Action<object> datas)
|
protected override void GetVirtualListDatas(Action<object> datas)
|
||||||
{
|
{
|
||||||
var roomList = App.roomMgr.GetRoomList();
|
App.StartCoroutine(Test(datas));
|
||||||
datas.Invoke(roomList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IEnumerator Test(Action<object> datas)
|
||||||
|
{
|
||||||
|
yield return null;
|
||||||
|
|
||||||
|
List<Protobuf_Room_MiniInfo> fakeData = new List<Protobuf_Room_MiniInfo>()
|
||||||
|
{
|
||||||
|
new Protobuf_Room_MiniInfo{ GameRomID = 1, RoomID = 1, HostPlayerUID = 1, Player1UID = 1, Player1NickName = "Test1"},
|
||||||
|
new Protobuf_Room_MiniInfo{ GameRomID = 2, RoomID = 2, HostPlayerUID = 2, Player1UID = 2, Player1NickName = "Test2"},
|
||||||
|
new Protobuf_Room_MiniInfo{ GameRomID = 3, RoomID = 3, HostPlayerUID = 3, Player1UID = 3, Player1NickName = "Test3"},
|
||||||
|
new Protobuf_Room_MiniInfo{ GameRomID = 4, RoomID = 4, HostPlayerUID = 4, Player1UID = 4, Player1NickName = "Test4"},
|
||||||
|
new Protobuf_Room_MiniInfo{ GameRomID = 5, RoomID = 5, HostPlayerUID = 5, Player1UID = 5, Player1NickName = "Test5"},
|
||||||
|
};
|
||||||
|
|
||||||
|
datas.Invoke(fakeData);
|
||||||
|
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
protected override MenuItem GetItemUIByIndex(int index)
|
protected override MenuItem GetItemUIByIndex(int index)
|
||||||
{
|
{
|
||||||
return itemGroup.GetItemUIByDataIndex(index)?.GetComponent<MenuItem>();
|
return itemGroup.GetItemUIByDataIndex(index).GetComponent<MenuItem>();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Awake()
|
protected override void Awake()
|
||||||
@ -63,16 +63,13 @@ namespace AxibugEmuOnline.Client
|
|||||||
protected override bool OnCmdEnter()
|
protected override bool OnCmdEnter()
|
||||||
{
|
{
|
||||||
var item = GetItemUIByIndex(SelectIndex);
|
var item = GetItemUIByIndex(SelectIndex);
|
||||||
if (item != null)
|
return item.OnEnterItem();
|
||||||
return item.OnEnterItem();
|
|
||||||
else
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnCmdBack()
|
protected override void OnCmdBack()
|
||||||
{
|
{
|
||||||
var item = GetItemUIByIndex(SelectIndex);
|
var item = GetItemUIByIndex(SelectIndex);
|
||||||
item?.OnExitItem();
|
item.OnExitItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LateUpdate()
|
private void LateUpdate()
|
||||||
|
@ -3,7 +3,11 @@ using DG.Tweening;
|
|||||||
using DG.Tweening.Core;
|
using DG.Tweening.Core;
|
||||||
using DG.Tweening.Plugins.Options;
|
using DG.Tweening.Plugins.Options;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using VirtualNes.Core;
|
||||||
|
using App = AxibugEmuOnline.Client.ClientCore.App;
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
namespace AxibugEmuOnline.Client
|
||||||
{
|
{
|
||||||
@ -11,7 +15,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
protected CanvasGroup RomGroupRoot;
|
protected CanvasGroup RomGroupRoot;
|
||||||
|
|
||||||
|
|
||||||
private TweenerCore<float, float, FloatOptions> m_showTween;
|
private TweenerCore<float, float, FloatOptions> m_showTween;
|
||||||
|
|
||||||
@ -56,16 +60,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot;
|
var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot;
|
||||||
thirdMenuGroup.itemGroup.Clear();
|
thirdMenuGroup.itemGroup.Clear();
|
||||||
|
|
||||||
RefreshUI();
|
|
||||||
|
|
||||||
if (SubMenuItemGroup != null) SubMenuItemGroup.SetSelect(true);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void RefreshUI()
|
|
||||||
{
|
|
||||||
GetVirtualListDatas((datas) =>
|
GetVirtualListDatas((datas) =>
|
||||||
{
|
{
|
||||||
var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot;
|
var thirdMenuGroup = SubMenuItemGroup as ThirdMenuRoot;
|
||||||
@ -74,6 +69,10 @@ namespace AxibugEmuOnline.Client
|
|||||||
thirdMenuGroup.itemGroup.UpdateProxyVisualState();
|
thirdMenuGroup.itemGroup.UpdateProxyVisualState();
|
||||||
thirdMenuGroup.ResetToFirst();
|
thirdMenuGroup.ResetToFirst();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (SubMenuItemGroup != null) SubMenuItemGroup.SetSelect(true);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void GetVirtualListDatas(Action<object> datas);
|
protected abstract void GetVirtualListDatas(Action<object> datas);
|
||||||
|
Loading…
Reference in New Issue
Block a user