Merge pull request 'master' (#84) from Alienjack/AxibugEmuOnline:master into master

Reviewed-on: sin365/AxibugEmuOnline#84
This commit is contained in:
sin365 2025-01-07 14:26:16 +08:00
commit ba93b5747b
35 changed files with 1723 additions and 1747 deletions

View File

@ -6,7 +6,6 @@ using System.Collections;
using System.IO; using System.IO;
using System.Threading.Tasks; using System.Threading.Tasks;
using UnityEngine; using UnityEngine;
using UnityEngine.Networking;
using static AxibugEmuOnline.Client.HttpAPI; using static AxibugEmuOnline.Client.HttpAPI;
using static AxibugEmuOnline.Client.Manager.LogManager; using static AxibugEmuOnline.Client.Manager.LogManager;
@ -47,7 +46,7 @@ namespace AxibugEmuOnline.Client.ClientCore
#else #else
public static string PersistentDataPath => Application.persistentDataPath; public static string PersistentDataPath => Application.persistentDataPath;
#endif #endif
public static void Init( bool isTest = false, string testSrvIP = "") public static void Init(bool isTest = false, string testSrvIP = "")
{ {
log = new LogManager(OnLogOut); log = new LogManager(OnLogOut);

View File

@ -1,5 +1,5 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.IO.Compression; using System.IO.Compression;

View File

@ -1,4 +1,4 @@
using UnityEngine; using UnityEngine;
using static AxiHttp; using static AxiHttp;
public static class AxiHttpProxy public static class AxiHttpProxy

View File

@ -432,7 +432,7 @@ namespace AxibugEmuOnline.Client.Manager
/// 发送修改玩家槽位,全量 /// 发送修改玩家槽位,全量
/// </summary> /// </summary>
/// <param name="dictSlotIdx2LocalJoyIdx">玩家占用房间GamePlaySlot和LocalJoyIdx字典</param> /// <param name="dictSlotIdx2LocalJoyIdx">玩家占用房间GamePlaySlot和LocalJoyIdx字典</param>
public void SendChangePlaySlotIdxWithJoyIdx(Dictionary<uint, ValueTuple<uint,GamePadType>> dictSlotIdx2LocalJoyIdx) public void SendChangePlaySlotIdxWithJoyIdx(Dictionary<uint, ValueTuple<uint, GamePadType>> dictSlotIdx2LocalJoyIdx)
{ {
if (!InRoom) if (!InRoom)
return; return;

View File

@ -1,6 +1,5 @@
using AxibugEmuOnline.Client; using AxibugEmuOnline.Client;
using UnityEngine; using UnityEngine;
using UnityEngine.Rendering;
public class Filter1990_esque : FilterEffect public class Filter1990_esque : FilterEffect
{ {

View File

@ -1,6 +1,5 @@
using Assets.Script.AppMain.Filter; using Assets.Script.AppMain.Filter;
using AxibugEmuOnline.Client; using AxibugEmuOnline.Client;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.Experimental.Rendering; using UnityEngine.Experimental.Rendering;

View File

@ -1,5 +1,4 @@
using System; using System;
using System.Collections;
using UnityEngine; using UnityEngine;
namespace Assets.Script.AppMain.Filter namespace Assets.Script.AppMain.Filter

View File

@ -1,10 +1,9 @@
using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.ClientCore;
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using UnityEngine; using UnityEngine;
using UnityEngine.Networking;
namespace AxibugEmuOnline.Client namespace AxibugEmuOnline.Client
{ {

View File

@ -1,9 +1,7 @@
using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.ClientCore;
using AxibugProtobuf;
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text;
using UnityEngine; using UnityEngine;
namespace AxibugEmuOnline.Client namespace AxibugEmuOnline.Client
@ -18,14 +16,14 @@ namespace AxibugEmuOnline.Client
public void GetNesRomList(Action<int, Resp_GameList> callback, AxibugProtobuf.RomPlatformType platform, int page, int pageSize = 10) public void GetNesRomList(Action<int, Resp_GameList> callback, AxibugProtobuf.RomPlatformType platform, int page, int pageSize = 10)
{ {
App.StartCoroutine(GetRomListFlow(platform,page, pageSize, callback)); App.StartCoroutine(GetRomListFlow(platform, page, pageSize, callback));
} }
public void SearchNesRomList(Action<int, Resp_GameList> callback, AxibugProtobuf.RomPlatformType platform, string searchKey, int page, int pageSize = 10) public void SearchNesRomList(Action<int, Resp_GameList> callback, AxibugProtobuf.RomPlatformType platform, string searchKey, int page, int pageSize = 10)
{ {
App.StartCoroutine(SearchNesRomListFlow(platform,searchKey, page, pageSize, callback)); App.StartCoroutine(SearchNesRomListFlow(platform, searchKey, page, pageSize, callback));
} }
private IEnumerator SearchNesRomListFlow(AxibugProtobuf.RomPlatformType platform,string searchKey, int page, int pageSize, Action<int, Resp_GameList> callback) private IEnumerator SearchNesRomListFlow(AxibugProtobuf.RomPlatformType platform, string searchKey, int page, int pageSize, Action<int, Resp_GameList> callback)
{ {
if (!string.IsNullOrEmpty(searchKey)) if (!string.IsNullOrEmpty(searchKey))
{ {

View File

@ -1,5 +1,5 @@
/// <summary> /// <summary>
/// String和Bool的缝合怪 /// String和Bool的缝合怪
/// </summary> /// </summary>
public struct MsgBool public struct MsgBool
{ {

View File

@ -1,5 +1,4 @@
using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.Common;
using AxibugEmuOnline.Client.Common;
using AxibugEmuOnline.Client.Event; using AxibugEmuOnline.Client.Event;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -91,7 +90,7 @@ namespace AxibugEmuOnline.Client
Controller targetController; Controller targetController;
switch (conIndex) switch (conIndex)
{ {
case 0: targetController = Controller0;break; case 0: targetController = Controller0; break;
case 1: targetController = Controller1; break; case 1: targetController = Controller1; break;
case 2: targetController = Controller2; break; case 2: targetController = Controller2; break;
case 3: targetController = Controller3; break; case 3: targetController = Controller3; break;

View File

@ -1,10 +1,10 @@
using System; using AxibugEmuOnline.Client.ClientCore;
using AxibugProtobuf;
using System;
using System.Diagnostics; using System.Diagnostics;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Xml.Linq; using System.Xml.Linq;
using AxibugEmuOnline.Client.ClientCore;
using AxibugProtobuf;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
using VirtualNes.Core; using VirtualNes.Core;

View File

@ -1,6 +1,4 @@
using VirtualNes.Core; namespace AxibugEmuOnline.Client
namespace AxibugEmuOnline.Client
{ {
public static class PaletteDefine public static class PaletteDefine
{ {

View File

@ -66,7 +66,7 @@ namespace AxibugEmuOnline.Client.Network
{ {
lock (lockQueueObj) lock (lockQueueObj)
{ {
queueNetMsg.Enqueue(new ValueTuple<int,int,byte[]>(cmd, ERRCODE, arg)); queueNetMsg.Enqueue(new ValueTuple<int, int, byte[]>(cmd, ERRCODE, arg));
} }
} }
@ -88,7 +88,7 @@ namespace AxibugEmuOnline.Client.Network
ErrorCode err = ((ErrorCode)ERRCODE); ErrorCode err = ((ErrorCode)ERRCODE);
if (err != ErrorCode.ErrorOk) if (err != ErrorCode.ErrorOk)
{ {
OverlayManager.PopTip("错误:"+err.ToString()); OverlayManager.PopTip("错误:" + err.ToString());
} }
List<Delegate> eventList = GetNetEventDicList(cmd); List<Delegate> eventList = GetNetEventDicList(cmd);

View File

@ -1,5 +1,4 @@
using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.ClientCore;
using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace AxibugEmuOnline.Client namespace AxibugEmuOnline.Client

View File

@ -1,5 +1,4 @@
using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.ClientCore;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;

View File

@ -1,7 +1,6 @@
using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.ClientCore;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine;
using static AxibugEmuOnline.Client.ScreenScaler; using static AxibugEmuOnline.Client.ScreenScaler;
namespace AxibugEmuOnline.Client namespace AxibugEmuOnline.Client

View File

@ -1,4 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public static class GameObjectPool public static class GameObjectPool

View File

@ -1,4 +1,4 @@
using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.ClientCore;
using UnityEngine; using UnityEngine;
namespace AxibugEmuOnline.Client namespace AxibugEmuOnline.Client
@ -30,7 +30,7 @@ namespace AxibugEmuOnline.Client
} }
else else
{ {
App.log.Warning($"尚未支持的数据类型:{valueMenu.ValueType}"); App.log.Warning($"尚未支持的数据类型:{valueMenu.ValueType}");
return; return;
} }

View File

@ -1,5 +1,4 @@
using System; using UnityEngine;
using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
namespace AxibugEmuOnline.Client namespace AxibugEmuOnline.Client

View File

@ -1,5 +1,4 @@
using AxibugEmuOnline.Client.ClientCore; using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;

View File

@ -1,4 +1,4 @@
using DG.Tweening; using DG.Tweening;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
@ -22,7 +22,7 @@ namespace AxibugEmuOnline.Client
m_msgText.text = msg; m_msgText.text = msg;
Canvas.ForceUpdateCanvases(); Canvas.ForceUpdateCanvases();
var targetPos = new Vector2(-RectTransform.rect.width - 20 , RectTransform.anchoredPosition.y); var targetPos = new Vector2(-RectTransform.rect.width - 20, RectTransform.anchoredPosition.y);
DOTween.To( DOTween.To(
() => RectTransform.anchoredPosition, () => RectTransform.anchoredPosition,
(value) => RectTransform.anchoredPosition = value, (value) => RectTransform.anchoredPosition = value,

View File

@ -1,6 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using UnityEngine; using UnityEngine;
namespace AxibugEmuOnline.Client namespace AxibugEmuOnline.Client

View File

@ -1,6 +1,5 @@
using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.ClientCore;
using AxibugEmuOnline.Client.Event; using AxibugEmuOnline.Client.Event;
using System;
namespace AxibugEmuOnline.Client namespace AxibugEmuOnline.Client
{ {

View File

@ -1,4 +1,4 @@
using AxibugEmuOnline.Client.UI; using AxibugEmuOnline.Client.UI;
using DG.Tweening; using DG.Tweening;
using DG.Tweening.Core; using DG.Tweening.Core;
using DG.Tweening.Plugins.Options; using DG.Tweening.Plugins.Options;
@ -185,8 +185,8 @@ namespace AxibugEmuOnline.Client
{ {
#if UNITY_EDITOR #if UNITY_EDITOR
//========================套娃宏======================== //========================套娃宏========================
#if UNITY_2019_1_OR_NEWER //新版Unity因UNITY2018.2用不了这玩意儿,编辑器也罢 #if UNITY_2019_1_OR_NEWER //新版Unity因UNITY2018.2用不了这玩意儿,编辑器也罢
if (Application.isPlaying) if (Application.isPlaying)
{ {
@ -205,7 +205,7 @@ namespace AxibugEmuOnline.Client
item.transform.localPosition = Vector3.zero; item.transform.localPosition = Vector3.zero;
return item; return item;
#endif #endif
//========================套娃宏 End======================== //========================套娃宏 End========================

View File

@ -1,4 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;

View File

@ -2,7 +2,6 @@
using DG.Tweening; 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.Collections; using System.Collections;
using UnityEngine; using UnityEngine;
@ -13,7 +12,6 @@ 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;
protected override void Awake() protected override void Awake()

View File

@ -2,10 +2,8 @@
using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.ClientCore;
using AxibugEmuOnline.Client.Event; using AxibugEmuOnline.Client.Event;
using DG.Tweening; using DG.Tweening;
using System;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using VirtualNes.Core;
public class ControllerInfo : MonoBehaviour public class ControllerInfo : MonoBehaviour
{ {

View File

@ -3,10 +3,8 @@ using AxibugEmuOnline.Client.ClientCore;
using AxibugEmuOnline.Client.Event; using AxibugEmuOnline.Client.Event;
using AxibugEmuOnline.Client.Manager; using AxibugEmuOnline.Client.Manager;
using AxibugProtobuf; using AxibugProtobuf;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using VirtualNes.Core;
public class ControllerInfoPanel : MonoBehaviour public class ControllerInfoPanel : MonoBehaviour
{ {