mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-04-21 03:29:36 +08:00
修改RoomEventArgs构造函数
This commit is contained in:
parent
3228addf9e
commit
3290278df4
@ -9,25 +9,18 @@ namespace Milimoe.FunGame.Core.Library.Common.Event
|
|||||||
public Room Room { get; set; } = General.HallInstance;
|
public Room Room { get; set; } = General.HallInstance;
|
||||||
public string RoomID { get; set; } = "";
|
public string RoomID { get; set; } = "";
|
||||||
public long RoomMaster { get; set; } = 0;
|
public long RoomMaster { get; set; } = 0;
|
||||||
public string RoomTypeString { get; set; } = RoomSet.All;
|
|
||||||
public RoomType RoomType { get; set; } = RoomType.All;
|
public RoomType RoomType { get; set; } = RoomType.All;
|
||||||
|
public string RoomTypeString { get; set; } = RoomSet.All;
|
||||||
public string GameMode { get; set; } = "";
|
public string GameMode { get; set; } = "";
|
||||||
public string GameMap { get; set; } = "";
|
public string GameMap { get; set; } = "";
|
||||||
public RoomState RoomState { get; set; } = RoomState.Created;
|
public RoomState RoomState { get; set; } = RoomState.Created;
|
||||||
public bool HasPassword => Password.Trim() != "";
|
public bool HasPassword => Password.Trim() != "";
|
||||||
public string Password { get; set; } = "";
|
public string Password { get; set; } = "";
|
||||||
|
|
||||||
public RoomEventArgs(string type, string password)
|
public RoomEventArgs(RoomType type, string password)
|
||||||
{
|
{
|
||||||
RoomTypeString = type;
|
RoomType = type;
|
||||||
RoomType = type switch
|
RoomTypeString = RoomSet.GetTypeString(type);
|
||||||
{
|
|
||||||
RoomSet.Mix => RoomType.Mix,
|
|
||||||
RoomSet.Team => RoomType.Team,
|
|
||||||
RoomSet.FastAuto => RoomType.FastAuto,
|
|
||||||
RoomSet.Custom => RoomType.Custom,
|
|
||||||
_ => RoomType.All
|
|
||||||
};
|
|
||||||
Password = password;
|
Password = password;
|
||||||
Room = Factory.GetRoom(RoomType: RoomType, Password: Password);
|
Room = Factory.GetRoom(RoomType: RoomType, Password: Password);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user