mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-04-20 19:19: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 string RoomID { get; set; } = "";
|
||||
public long RoomMaster { get; set; } = 0;
|
||||
public string RoomTypeString { get; set; } = RoomSet.All;
|
||||
public RoomType RoomType { get; set; } = RoomType.All;
|
||||
public string RoomTypeString { get; set; } = RoomSet.All;
|
||||
public string GameMode { get; set; } = "";
|
||||
public string GameMap { get; set; } = "";
|
||||
public RoomState RoomState { get; set; } = RoomState.Created;
|
||||
public bool HasPassword => Password.Trim() != "";
|
||||
public string Password { get; set; } = "";
|
||||
|
||||
public RoomEventArgs(string type, string password)
|
||||
public RoomEventArgs(RoomType type, string password)
|
||||
{
|
||||
RoomTypeString = type;
|
||||
RoomType = type switch
|
||||
{
|
||||
RoomSet.Mix => RoomType.Mix,
|
||||
RoomSet.Team => RoomType.Team,
|
||||
RoomSet.FastAuto => RoomType.FastAuto,
|
||||
RoomSet.Custom => RoomType.Custom,
|
||||
_ => RoomType.All
|
||||
};
|
||||
RoomType = type;
|
||||
RoomTypeString = RoomSet.GetTypeString(type);
|
||||
Password = password;
|
||||
Room = Factory.GetRoom(RoomType: RoomType, Password: Password);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user