mirror of
https://github.com/project-redbud/FunGame-Desktop.git
synced 2025-04-23 21:49:34 +08:00

* 添加Gaming接口 * 修改MainUI,预留了Gaming的相关接口 * Fix: ConnectEventArgs的参数不正确 * 新的AddonController构造方法 * 完善MainUI:添加了房间类型、模组、地图选择框 --------- Co-authored-by: yeziuku <yezi@wrss.org>
45 lines
1.9 KiB
C#
45 lines
1.9 KiB
C#
using Milimoe.FunGame.Core.Api.Transmittal;
|
|
using Milimoe.FunGame.Core.Library.Constant;
|
|
|
|
namespace Milimoe.FunGame.Desktop.Model
|
|
{
|
|
/// <summary>
|
|
/// 运行时单例
|
|
/// </summary>
|
|
public class RunTime
|
|
{
|
|
public static Core.Model.RoomList RoomList { get; } = new();
|
|
public static Core.Model.Session Session { get; } = new();
|
|
public static Core.Model.FunGameConfig Config { get; } = new();
|
|
public static Core.Model.Gaming? Gaming { get; set; } = null;
|
|
public static Core.Api.Utility.PluginLoader? PluginLoader { get; set; } = null;
|
|
public static Core.Api.Utility.GameModeLoader? GameModeLoader { get; set; } = null;
|
|
public static Core.Library.Common.Network.Socket? Socket { get; set; } = null;
|
|
public static Controller.RunTimeController? Controller { get; set; } = null;
|
|
public static UI.Main? Main { get; set; } = null;
|
|
public static UI.Login? Login { get; set; } = null;
|
|
public static UI.Register? Register { get; set; } = null;
|
|
public static UI.StoreUI? Store { get; set; } = null;
|
|
public static UI.InventoryUI? Inventory { get; set; } = null;
|
|
public static UI.RoomSetting? RoomSetting { get; set; } = null;
|
|
public static UI.UserCenter? UserCenter { get; set; } = null;
|
|
|
|
public static void WritelnSystemInfo(string msg)
|
|
{
|
|
Controller?.WritelnSystemInfo(msg);
|
|
}
|
|
|
|
public static DataRequest NewDataRequest(DataRequestType RequestType)
|
|
{
|
|
DataRequest? request = Controller?.NewDataRequest(RequestType);
|
|
return request is null ? throw new ConnectFailedException() : request;
|
|
}
|
|
|
|
public static DataRequest NewLongRunningDataRequest(DataRequestType RequestType)
|
|
{
|
|
DataRequest? request = Controller?.NewLongRunningDataRequest(RequestType);
|
|
return request is null ? throw new ConnectFailedException() : request;
|
|
}
|
|
}
|
|
}
|