mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-12-05 08:09:02 +00:00
添加新的枚举、字符常量和方法 (#59)
* 添加大量新的枚举,添加缺少的枚举字符串,修改枚举转字符串方法的位置 * 添加StartGame和Gaming的SocketHandler方法 * 添加MainInvokeType.StartGame * 优化代码格式 * 添加默认的User.ToString() * 添加EndGame * 添加GameMode.GetTypeString * 添加GameMode.GetRoomType
This commit is contained in:
parent
5341e1734a
commit
e7214c3fb9
@ -195,34 +195,6 @@ namespace Milimoe.FunGame.Core.Api.Transmittal
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取Type的等效字符串
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="type"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static string GetTypeString(DataRequestType type)
|
|
||||||
{
|
|
||||||
return type switch
|
|
||||||
{
|
|
||||||
DataRequestType.RunTime_Logout => DataRequestSet.RunTime_Logout,
|
|
||||||
DataRequestType.Main_GetNotice => DataRequestSet.Main_GetNotice,
|
|
||||||
DataRequestType.Main_CreateRoom => DataRequestSet.Main_CreateRoom,
|
|
||||||
DataRequestType.Main_UpdateRoom => DataRequestSet.Main_UpdateRoom,
|
|
||||||
DataRequestType.Main_IntoRoom => DataRequestSet.Main_IntoRoom,
|
|
||||||
DataRequestType.Main_QuitRoom => DataRequestSet.Main_QuitRoom,
|
|
||||||
DataRequestType.Main_MatchRoom => DataRequestSet.Main_MatchRoom,
|
|
||||||
DataRequestType.Main_Chat => DataRequestSet.Main_Chat,
|
|
||||||
DataRequestType.Reg_GetRegVerifyCode => DataRequestSet.Reg_GetRegVerifyCode,
|
|
||||||
DataRequestType.Login_Login => DataRequestSet.Login_Login,
|
|
||||||
DataRequestType.Login_GetFindPasswordVerifyCode => DataRequestSet.Login_GetFindPasswordVerifyCode,
|
|
||||||
DataRequestType.Login_UpdatePassword => DataRequestSet.Login_UpdatePassword,
|
|
||||||
DataRequestType.Room_GetRoomSettings => DataRequestSet.Room_GetRoomSettings,
|
|
||||||
DataRequestType.Room_GetRoomPlayerCount => DataRequestSet.Room_GetRoomPlayerCount,
|
|
||||||
DataRequestType.Room_UpdateRoomMaster => DataRequestSet.Room_UpdateRoomMaster,
|
|
||||||
_ => DataRequestSet.UnKnown
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 反序列化Hashtable中的Json对象
|
/// 反序列化Hashtable中的Json对象
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Data;
|
||||||
using System.Data;
|
|
||||||
using Milimoe.FunGame.Core.Api.Factory;
|
using Milimoe.FunGame.Core.Api.Factory;
|
||||||
using Milimoe.FunGame.Core.Entity;
|
using Milimoe.FunGame.Core.Entity;
|
||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using System.Reflection;
|
||||||
using System.Reflection;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Core.Api.Utility
|
namespace Milimoe.FunGame.Core.Api.Utility
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Linq;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
using Milimoe.FunGame.Core.Library.Common.Architecture;
|
using Milimoe.FunGame.Core.Library.Common.Architecture;
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
using System.IO;
|
using System.Runtime.InteropServices;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Core.Api.Utility
|
namespace Milimoe.FunGame.Core.Api.Utility
|
||||||
|
|||||||
@ -335,6 +335,18 @@ namespace Milimoe.FunGame.Core.Controller
|
|||||||
SocketHandler_MatchRoom(ServerMessage);
|
SocketHandler_MatchRoom(ServerMessage);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SocketMessageType.StartGame:
|
||||||
|
SocketHandler_StartGame(ServerMessage);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SocketMessageType.EndGame:
|
||||||
|
SocketHandler_EndGame(ServerMessage);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SocketMessageType.Gaming:
|
||||||
|
SocketHandler_Gaming(ServerMessage);
|
||||||
|
break;
|
||||||
|
|
||||||
case SocketMessageType.Unknown:
|
case SocketMessageType.Unknown:
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -390,5 +402,23 @@ namespace Milimoe.FunGame.Core.Controller
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ServerMessage"></param>
|
/// <param name="ServerMessage"></param>
|
||||||
protected abstract void SocketHandler_MatchRoom(SocketObject ServerMessage);
|
protected abstract void SocketHandler_MatchRoom(SocketObject ServerMessage);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 客户端接收到开始游戏信息后的处理方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ServerMessage"></param>
|
||||||
|
protected abstract void SocketHandler_StartGame(SocketObject ServerMessage);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 客户端接收到游戏结束信息后的处理方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ServerMessage"></param>
|
||||||
|
protected abstract void SocketHandler_EndGame(SocketObject ServerMessage);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 客户端接收到局内消息后的处理方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ServerMessage"></param>
|
||||||
|
protected abstract void SocketHandler_Gaming(SocketObject ServerMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using System.Collections;
|
using Milimoe.FunGame.Core.Interface.Entity;
|
||||||
using Milimoe.FunGame.Core.Interface.Entity;
|
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Core.Entity
|
namespace Milimoe.FunGame.Core.Entity
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using System.Collections;
|
||||||
using System.Collections;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Core.Entity
|
namespace Milimoe.FunGame.Core.Entity
|
||||||
{
|
{
|
||||||
|
|||||||
@ -52,5 +52,15 @@ namespace Milimoe.FunGame.Core.Entity
|
|||||||
if (((User)other).Id == Id) return true;
|
if (((User)other).Id == Id) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
string str = Username;
|
||||||
|
if (NickName != "")
|
||||||
|
{
|
||||||
|
str += " ( " + NickName + " ) ";
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
using Milimoe.FunGame.Core.Library.Constant;
|
namespace Milimoe.FunGame.Core.Interface.Base
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Core.Interface.Base
|
|
||||||
{
|
{
|
||||||
public interface IMailSender
|
public interface IMailSender
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
using Milimoe.FunGame.Core.Model;
|
namespace Milimoe.FunGame.Core.Library.Common.Architecture
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Core.Library.Common.Architecture
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 继承这个类可以获得异步等待的功能
|
/// 继承这个类可以获得异步等待的功能
|
||||||
|
|||||||
@ -113,9 +113,6 @@ namespace Milimoe.FunGame.Core.Library.Common.Network
|
|||||||
Instance?.Close();
|
Instance?.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetTypeString(SocketMessageType type)
|
public static string GetTypeString(SocketMessageType type) => SocketSet.GetTypeString(type);
|
||||||
{
|
|
||||||
return Socket.GetTypeString(type);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -179,9 +179,6 @@ namespace Milimoe.FunGame.Core.Library.Common.Network
|
|||||||
throw new LostConnectException();
|
throw new LostConnectException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetTypeString(SocketMessageType type)
|
public static string GetTypeString(SocketMessageType type) => SocketSet.GetTypeString(type);
|
||||||
{
|
|
||||||
return SocketManager.GetTypeString(type);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,9 +20,7 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 需要同步更新
|
/// 需要同步更新 <see cref="SocketMessageType"/>
|
||||||
/// Milimoe.FunGame.Core.Library.Constant.SocketMessageType,
|
|
||||||
/// Milimoe.FunGame.Core.Service.SocketManager.GetTypeString(SocketMessageType type)
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SocketSet
|
public class SocketSet
|
||||||
{
|
{
|
||||||
@ -36,16 +34,44 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
public const string DataRequest = "DataRequest";
|
public const string DataRequest = "DataRequest";
|
||||||
public const string Connect = "Connect";
|
public const string Connect = "Connect";
|
||||||
public const string Disconnect = "Disconnect";
|
public const string Disconnect = "Disconnect";
|
||||||
|
public const string System = "System";
|
||||||
public const string HeartBeat = "HeartBeat";
|
public const string HeartBeat = "HeartBeat";
|
||||||
public const string ForceLogout = "ForceLogout";
|
public const string ForceLogout = "ForceLogout";
|
||||||
public const string Chat = "Chat";
|
public const string Chat = "Chat";
|
||||||
public const string UpdateRoomMaster = "UpdateRoomMaster";
|
public const string UpdateRoomMaster = "UpdateRoomMaster";
|
||||||
|
public const string MatchRoom = "MatchRoom";
|
||||||
|
public const string StartGame = "StartGame";
|
||||||
|
public const string EndGame = "EndGame";
|
||||||
|
public const string Gaming = "Gaming";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 将通信类型的枚举转换为字符串
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type">通信类型</param>
|
||||||
|
/// <returns>等效字符串</returns>
|
||||||
|
public static string GetTypeString(SocketMessageType type)
|
||||||
|
{
|
||||||
|
return type switch
|
||||||
|
{
|
||||||
|
SocketMessageType.DataRequest => DataRequest,
|
||||||
|
SocketMessageType.Connect => Connect,
|
||||||
|
SocketMessageType.Disconnect => Disconnect,
|
||||||
|
SocketMessageType.System => System,
|
||||||
|
SocketMessageType.HeartBeat => HeartBeat,
|
||||||
|
SocketMessageType.ForceLogout => ForceLogout,
|
||||||
|
SocketMessageType.Chat => Chat,
|
||||||
|
SocketMessageType.UpdateRoomMaster => UpdateRoomMaster,
|
||||||
|
SocketMessageType.MatchRoom => MatchRoom,
|
||||||
|
SocketMessageType.StartGame => StartGame,
|
||||||
|
SocketMessageType.EndGame => EndGame,
|
||||||
|
SocketMessageType.Gaming => Gaming,
|
||||||
|
_ => Unknown
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 需要同步更新
|
/// 需要同步更新 <see cref="DataRequestType"/>
|
||||||
/// Milimoe.FunGame.Core.Library.Constant.DataRequestType,
|
|
||||||
/// Milimoe.FunGame.Core.Api.Transmittal.DataRequest.GetTypeString(DataRequestType type)
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DataRequestSet
|
public class DataRequestSet
|
||||||
{
|
{
|
||||||
@ -64,6 +90,9 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
public const string Main_UpdateRoom = "Main::UpdateRoom";
|
public const string Main_UpdateRoom = "Main::UpdateRoom";
|
||||||
public const string Main_MatchRoom = "Main::MatchRoom";
|
public const string Main_MatchRoom = "Main::MatchRoom";
|
||||||
public const string Main_Chat = "Main::Chat";
|
public const string Main_Chat = "Main::Chat";
|
||||||
|
public const string Main_Ready = "Main::Ready";
|
||||||
|
public const string Main_CancelReady = "Main::CancelReady";
|
||||||
|
public const string Main_StartGame = "Main::StartGame";
|
||||||
/**
|
/**
|
||||||
* Register
|
* Register
|
||||||
*/
|
*/
|
||||||
@ -80,6 +109,75 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
public const string Room_GetRoomSettings = "Room::GetRoomSettings";
|
public const string Room_GetRoomSettings = "Room::GetRoomSettings";
|
||||||
public const string Room_GetRoomPlayerCount = "Room::GetRoomPlayerCount";
|
public const string Room_GetRoomPlayerCount = "Room::GetRoomPlayerCount";
|
||||||
public const string Room_UpdateRoomMaster = "Room::UpdateRoomMaster";
|
public const string Room_UpdateRoomMaster = "Room::UpdateRoomMaster";
|
||||||
|
/**
|
||||||
|
* Gaming
|
||||||
|
*/
|
||||||
|
public const string Gaming_Connect = "Gaming::Connect";
|
||||||
|
public const string Gaming_Disconnect = "Gaming::Disconnect";
|
||||||
|
public const string Gaming_Reconnect = "Gaming::Reconnect";
|
||||||
|
public const string Gaming_Ban = "Gaming::Ban";
|
||||||
|
public const string Gaming_Pick = "Gaming::Pick";
|
||||||
|
public const string Gaming_Random = "Gaming::Random";
|
||||||
|
public const string Gaming_Move = "Gaming::Move";
|
||||||
|
public const string Gaming_Attack = "Gaming::Attack";
|
||||||
|
public const string Gaming_Skill = "Gaming::Skill";
|
||||||
|
public const string Gaming_Item = "Gaming::Item";
|
||||||
|
public const string Gaming_Magic = "Gaming::Magic";
|
||||||
|
public const string Gaming_Buy = "Gaming::Buy";
|
||||||
|
public const string Gaming_SuperSkill = "Gaming::SuperSkill";
|
||||||
|
public const string Gaming_Pause = "Gaming::Pause";
|
||||||
|
public const string Gaming_Unpause = "Gaming::Unpause";
|
||||||
|
public const string Gaming_Surrender = "Gaming::Surrender";
|
||||||
|
public const string Gaming_UpdateUserInfo = "Gaming::UpdateUserInfo";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取Type的等效字符串
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string GetTypeString(DataRequestType type)
|
||||||
|
{
|
||||||
|
return type switch
|
||||||
|
{
|
||||||
|
DataRequestType.RunTime_Logout => RunTime_Logout,
|
||||||
|
DataRequestType.Main_GetNotice => Main_GetNotice,
|
||||||
|
DataRequestType.Main_CreateRoom => Main_CreateRoom,
|
||||||
|
DataRequestType.Main_UpdateRoom => Main_UpdateRoom,
|
||||||
|
DataRequestType.Main_IntoRoom => Main_IntoRoom,
|
||||||
|
DataRequestType.Main_QuitRoom => Main_QuitRoom,
|
||||||
|
DataRequestType.Main_MatchRoom => Main_MatchRoom,
|
||||||
|
DataRequestType.Main_Chat => Main_Chat,
|
||||||
|
DataRequestType.Main_Ready => Main_Ready,
|
||||||
|
DataRequestType.Main_CancelReady => Main_CancelReady,
|
||||||
|
DataRequestType.Main_StartGame => Main_StartGame,
|
||||||
|
DataRequestType.Reg_GetRegVerifyCode => Reg_GetRegVerifyCode,
|
||||||
|
DataRequestType.Login_Login => Login_Login,
|
||||||
|
DataRequestType.Login_GetFindPasswordVerifyCode => Login_GetFindPasswordVerifyCode,
|
||||||
|
DataRequestType.Login_UpdatePassword => Login_UpdatePassword,
|
||||||
|
DataRequestType.Room_GetRoomSettings => Room_GetRoomSettings,
|
||||||
|
DataRequestType.Room_GetRoomPlayerCount => Room_GetRoomPlayerCount,
|
||||||
|
DataRequestType.Room_UpdateRoomMaster => Room_UpdateRoomMaster,
|
||||||
|
DataRequestType.Gaming_Connect => Gaming_Connect,
|
||||||
|
DataRequestType.Gaming_Disconnect => Gaming_Disconnect,
|
||||||
|
DataRequestType.Gaming_Reconnect => Gaming_Reconnect,
|
||||||
|
DataRequestType.Gaming_Ban => Gaming_Ban,
|
||||||
|
DataRequestType.Gaming_Pick => Gaming_Pick,
|
||||||
|
DataRequestType.Gaming_Random => Gaming_Random,
|
||||||
|
DataRequestType.Gaming_Move => Gaming_Move,
|
||||||
|
DataRequestType.Gaming_Attack => Gaming_Attack,
|
||||||
|
DataRequestType.Gaming_Skill => Gaming_Skill,
|
||||||
|
DataRequestType.Gaming_Item => Gaming_Item,
|
||||||
|
DataRequestType.Gaming_Magic => Gaming_Magic,
|
||||||
|
DataRequestType.Gaming_Buy => Gaming_Buy,
|
||||||
|
DataRequestType.Gaming_SuperSkill => Gaming_SuperSkill,
|
||||||
|
DataRequestType.Gaming_Pause => Gaming_Pause,
|
||||||
|
DataRequestType.Gaming_Unpause => Gaming_Unpause,
|
||||||
|
DataRequestType.Gaming_Surrender => Gaming_Surrender,
|
||||||
|
DataRequestType.Gaming_UpdateUserInfo => Gaming_UpdateUserInfo,
|
||||||
|
_ => UnKnown
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ReflectionSet
|
public class ReflectionSet
|
||||||
@ -108,5 +206,41 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
public const string MixHasPass = "带密码的混战模式";
|
public const string MixHasPass = "带密码的混战模式";
|
||||||
public const string Team = "团队模式";
|
public const string Team = "团队模式";
|
||||||
public const string TeamHasPass = "带密码的团队模式";
|
public const string TeamHasPass = "带密码的团队模式";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取Type的等效字符串
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string GetTypeString(RoomType type)
|
||||||
|
{
|
||||||
|
return type switch
|
||||||
|
{
|
||||||
|
RoomType.Mix => Mix,
|
||||||
|
RoomType.Team => Team,
|
||||||
|
RoomType.MixHasPass => MixHasPass,
|
||||||
|
RoomType.TeamHasPass => TeamHasPass,
|
||||||
|
RoomType.AllHasPass => AllHasPass,
|
||||||
|
_ => All
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取字符串对应的枚举
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static RoomType GetRoomType(string typestring)
|
||||||
|
{
|
||||||
|
return typestring switch
|
||||||
|
{
|
||||||
|
Mix => RoomType.Mix,
|
||||||
|
Team => RoomType.Team,
|
||||||
|
MixHasPass => RoomType.MixHasPass,
|
||||||
|
TeamHasPass => RoomType.TeamHasPass,
|
||||||
|
AllHasPass => RoomType.AllHasPass,
|
||||||
|
_ => RoomType.All
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,6 +20,15 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
Complete
|
Complete
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum SelectState
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
SelectingOne,
|
||||||
|
SelectingMultiple,
|
||||||
|
SelectingRange,
|
||||||
|
SelectingLine
|
||||||
|
}
|
||||||
|
|
||||||
public enum OnlineState
|
public enum OnlineState
|
||||||
{
|
{
|
||||||
Offline,
|
Offline,
|
||||||
|
|||||||
@ -54,7 +54,7 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 需要同步更新Milimoe.FunGame.Core.Library.Constant.SocketSet
|
/// 需要同步更新 <see cref="SocketSet"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum SocketMessageType
|
public enum SocketMessageType
|
||||||
{
|
{
|
||||||
@ -67,11 +67,14 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
ForceLogout,
|
ForceLogout,
|
||||||
Chat,
|
Chat,
|
||||||
UpdateRoomMaster,
|
UpdateRoomMaster,
|
||||||
MatchRoom
|
MatchRoom,
|
||||||
|
StartGame,
|
||||||
|
EndGame,
|
||||||
|
Gaming
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 需要同步更新Milimoe.FunGame.Core.Library.Constant.DataRequestSet
|
/// 需要同步更新 <see cref="DataRequestSet"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum DataRequestType
|
public enum DataRequestType
|
||||||
{
|
{
|
||||||
@ -93,7 +96,25 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
Login_UpdatePassword,
|
Login_UpdatePassword,
|
||||||
Room_GetRoomSettings,
|
Room_GetRoomSettings,
|
||||||
Room_GetRoomPlayerCount,
|
Room_GetRoomPlayerCount,
|
||||||
Room_UpdateRoomMaster
|
Room_UpdateRoomMaster,
|
||||||
|
Gaming_Connect,
|
||||||
|
Gaming_Disconnect,
|
||||||
|
Gaming_Reconnect,
|
||||||
|
Gaming_Ban,
|
||||||
|
Gaming_Pick,
|
||||||
|
Gaming_Random,
|
||||||
|
Gaming_Move,
|
||||||
|
Gaming_Attack,
|
||||||
|
Gaming_Skill,
|
||||||
|
Gaming_Item,
|
||||||
|
Gaming_Magic,
|
||||||
|
Gaming_Buy,
|
||||||
|
Gaming_SuperSkill,
|
||||||
|
Gaming_Pause,
|
||||||
|
Gaming_Unpause,
|
||||||
|
Gaming_Surrender,
|
||||||
|
Gaming_UpdateUserInfo,
|
||||||
|
Gaming_Punish
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SocketRuntimeType
|
public enum SocketRuntimeType
|
||||||
@ -208,6 +229,26 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
Particle
|
Particle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum ActionType
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
Ban,
|
||||||
|
Pick,
|
||||||
|
Random,
|
||||||
|
Move,
|
||||||
|
Attack,
|
||||||
|
Skill,
|
||||||
|
Item,
|
||||||
|
Magic,
|
||||||
|
Buy,
|
||||||
|
SuperSkill,
|
||||||
|
Pause,
|
||||||
|
Unpause,
|
||||||
|
Surrender,
|
||||||
|
UpdateUserInfo,
|
||||||
|
Punish
|
||||||
|
}
|
||||||
|
|
||||||
public enum VerifyCodeType
|
public enum VerifyCodeType
|
||||||
{
|
{
|
||||||
NumberVerifyCode,
|
NumberVerifyCode,
|
||||||
@ -302,7 +343,9 @@ namespace Milimoe.FunGame.Core.Library.Constant
|
|||||||
Chat,
|
Chat,
|
||||||
MatchRoom,
|
MatchRoom,
|
||||||
UpdateRoomMaster,
|
UpdateRoomMaster,
|
||||||
GetRoomPlayerCount
|
GetRoomPlayerCount,
|
||||||
|
StartGame,
|
||||||
|
EndGame
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum RegInvokeType
|
public enum RegInvokeType
|
||||||
|
|||||||
@ -247,26 +247,6 @@ namespace Milimoe.FunGame.Core.Service
|
|||||||
return result.ToArray();
|
return result.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 将通信类型的枚举转换为字符串
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="type">通信类型</param>
|
|
||||||
/// <returns>等效字符串</returns>
|
|
||||||
internal static string GetTypeString(SocketMessageType type)
|
|
||||||
{
|
|
||||||
return type switch
|
|
||||||
{
|
|
||||||
SocketMessageType.DataRequest => SocketSet.DataRequest,
|
|
||||||
SocketMessageType.Connect => SocketSet.Connect,
|
|
||||||
SocketMessageType.Disconnect => SocketSet.Disconnect,
|
|
||||||
SocketMessageType.HeartBeat => SocketSet.HeartBeat,
|
|
||||||
SocketMessageType.ForceLogout => SocketSet.ForceLogout,
|
|
||||||
SocketMessageType.Chat => SocketSet.Chat,
|
|
||||||
SocketMessageType.UpdateRoomMaster => SocketSet.UpdateRoomMaster,
|
|
||||||
_ => SocketSet.Unknown,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 事件
|
#region 事件
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user