Compare commits
No commits in common. "e649104475d81c6c000f7045374796eabfb33dd5" and "95d05cf799b82343666b165bbb0f2fd74fce26cd" have entirely different histories.
e649104475
...
95d05cf799
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 2ab970ec87696e44a99fdd18821215fc
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@ -889,7 +889,7 @@ MonoBehaviour:
|
|||||||
DownProgress: {fileID: 1484915906009859069}
|
DownProgress: {fileID: 1484915906009859069}
|
||||||
FileReadyFlag: {fileID: 6316945668089981796}
|
FileReadyFlag: {fileID: 6316945668089981796}
|
||||||
DownloadComplete: {fileID: 6633045760783967661}
|
DownloadComplete: {fileID: 6633045760783967661}
|
||||||
Star: {fileID: 2970190240800710577}
|
Star: {fileID: 0}
|
||||||
--- !u!114 &5700455559359757662
|
--- !u!114 &5700455559359757662
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@ -23,14 +23,7 @@ namespace AxibugEmuOnline.Client.ClientCore
|
|||||||
public static UserDataManager user;
|
public static UserDataManager user;
|
||||||
//public static AppNetGame netgame;
|
//public static AppNetGame netgame;
|
||||||
public static AppEmu emu;
|
public static AppEmu emu;
|
||||||
/// <summary>
|
|
||||||
/// nes Rom库
|
|
||||||
/// </summary>
|
|
||||||
public static RomLib nesRomLib;
|
public static RomLib nesRomLib;
|
||||||
/// <summary>
|
|
||||||
/// 收藏 Rom库
|
|
||||||
/// </summary>
|
|
||||||
public static RomLib starRomLib;
|
|
||||||
public static HttpAPI httpAPI;
|
public static HttpAPI httpAPI;
|
||||||
public static CacheManager CacheMgr;
|
public static CacheManager CacheMgr;
|
||||||
public static AppRoom roomMgr;
|
public static AppRoom roomMgr;
|
||||||
@ -75,7 +68,6 @@ namespace AxibugEmuOnline.Client.ClientCore
|
|||||||
if (bUseLocalWebApi)
|
if (bUseLocalWebApi)
|
||||||
httpAPI.WebHost = mLocalWebApi;
|
httpAPI.WebHost = mLocalWebApi;
|
||||||
nesRomLib = new RomLib(RomPlatformType.Nes);
|
nesRomLib = new RomLib(RomPlatformType.Nes);
|
||||||
starRomLib = new RomLib();
|
|
||||||
CacheMgr = new CacheManager();
|
CacheMgr = new CacheManager();
|
||||||
roomMgr = new AppRoom();
|
roomMgr = new AppRoom();
|
||||||
share = new AppShare();
|
share = new AppShare();
|
||||||
|
|||||||
@ -36,7 +36,7 @@ namespace AxibugEmuOnline.Client.Manager
|
|||||||
void RecvGameStar(byte[] reqData)
|
void RecvGameStar(byte[] reqData)
|
||||||
{
|
{
|
||||||
Protobuf_Game_Mark_RESP msg = ProtoBufHelper.DeSerizlize<Protobuf_Game_Mark_RESP>(reqData);
|
Protobuf_Game_Mark_RESP msg = ProtoBufHelper.DeSerizlize<Protobuf_Game_Mark_RESP>(reqData);
|
||||||
Eventer.Instance.PostEvent(EEvent.OnRomStarStateChanged, msg.RomID, msg.IsStar == 1);
|
Eventer.Instance.PostEvent(EEvent.OnRomStarStateChanged, msg.RomID,msg.IsStar == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
public delegate void GetRomListAPI(Action<int, Resp_GameList> callback, AxibugProtobuf.RomPlatformType Platform, int page, int pageSize = 10);
|
public delegate void GetRomListAPI(Action<int, Resp_GameList> callback, AxibugProtobuf.RomPlatformType Platform, int page, int pageSize = 10);
|
||||||
public delegate void SearchRomListAPI(Action<int, Resp_GameList> callback, AxibugProtobuf.RomPlatformType Platform, string searchKey, int page, int pageSize = 10);
|
public delegate void SearchRomListAPI(Action<int, Resp_GameList> callback, AxibugProtobuf.RomPlatformType Platform, string searchKey, int page, int pageSize = 10);
|
||||||
public delegate void GetStarRomListAPI(Action<int, Resp_GameList> callback, AxibugProtobuf.RomPlatformType platform, int page, int pageSize = 10);
|
|
||||||
|
|
||||||
public void GetRomList(Action<int, Resp_GameList> callback, AxibugProtobuf.RomPlatformType platform, int page, int pageSize = 10)
|
public void GetRomList(Action<int, Resp_GameList> callback, AxibugProtobuf.RomPlatformType platform, int page, int pageSize = 10)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -28,19 +28,17 @@ namespace AxibugEmuOnline.Client
|
|||||||
public RomLib(RomPlatformType platform)
|
public RomLib(RomPlatformType platform)
|
||||||
{
|
{
|
||||||
m_platform = platform;
|
m_platform = platform;
|
||||||
m_romGetFunc = App.httpAPI.GetRomList;
|
switch (platform)
|
||||||
m_romSearchFunc = App.httpAPI.SearchRomList;
|
{
|
||||||
|
case RomPlatformType.Nes:
|
||||||
|
m_romGetFunc = App.httpAPI.GetRomList;
|
||||||
|
m_romSearchFunc = App.httpAPI.SearchRomList;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
Eventer.Instance.RegisterEvent<int, bool>(EEvent.OnRomStarStateChanged, OnRomStarStateChanged);
|
Eventer.Instance.RegisterEvent<int, bool>(EEvent.OnRomStarStateChanged, OnRomStarStateChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> 无参构造函数将会创建一个管理收藏的Rom列表 </summary>
|
|
||||||
public RomLib() : this(RomPlatformType.All)
|
|
||||||
{
|
|
||||||
m_romGetFunc = App.httpAPI.GetMarkList;
|
|
||||||
m_romSearchFunc = App.httpAPI.SearchMarkList;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnRomStarStateChanged(int romID, bool star)
|
private void OnRomStarStateChanged(int romID, bool star)
|
||||||
{
|
{
|
||||||
var targetRom = nesRomFetchList.FirstOrDefault(rom => rom.ID == romID);
|
var targetRom = nesRomFetchList.FirstOrDefault(rom => rom.ID == romID);
|
||||||
@ -73,6 +71,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获得所有Rom文件
|
/// 获得所有Rom文件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="callback"></param>
|
||||||
public void FetchRomCount(Action<RomFile[]> callback, string searchKey = null)
|
public void FetchRomCount(Action<RomFile[]> callback, string searchKey = null)
|
||||||
{
|
{
|
||||||
lastSearchKey = searchKey;
|
lastSearchKey = searchKey;
|
||||||
|
|||||||
@ -7,8 +7,6 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
public class RomListMenuItem : VirtualSubMenuItem
|
public class RomListMenuItem : VirtualSubMenuItem
|
||||||
{
|
{
|
||||||
[SerializeField]
|
|
||||||
protected bool StarRom;
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
protected RomPlatformType Platform;
|
protected RomPlatformType Platform;
|
||||||
|
|
||||||
@ -16,16 +14,12 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (StarRom) return App.starRomLib;
|
switch (Platform)
|
||||||
else
|
{
|
||||||
{
|
case RomPlatformType.Nes:
|
||||||
switch (Platform)
|
return App.nesRomLib;
|
||||||
{
|
default:
|
||||||
case RomPlatformType.Nes:
|
throw new System.NotImplementedException($"未实现的平台 {Platform}");
|
||||||
return App.nesRomLib;
|
|
||||||
default:
|
|
||||||
throw new System.NotImplementedException($"未实现的平台 {Platform}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user