AxibugEmuOnline/AxibugEmuOnline.Client/Assets/Script/AppAxibugEmuOnline.cs

49 lines
1.4 KiB
C#
Raw Normal View History

2024-06-28 18:08:25 +08:00
using AxibugEmuOnline.Client.Manager;
using AxibugEmuOnline.Client.Network;
using System;
using UnityEngine;
using static AxibugEmuOnline.Client.Manager.LogManager;
namespace AxibugEmuOnline.Client.ClientCore
{
public class AppAxibugEmuOnline
{
public static string TokenStr;
public static long RID = -1;
public static string IP;
public static int Port;
public static LogManager log;
public static NetworkHelper networkHelper;
public static AppLogin login;
public static AppChat chat;
public static UserDataManager user;
2024-07-03 14:43:11 +08:00
public static AppNetGame netgame;
public static AppEmu emu;
2024-06-28 18:08:25 +08:00
public static void Init()
{
log = new LogManager();
LogManager.OnLog += OnNoSugarNetLog;
networkHelper = new NetworkHelper();
login = new AppLogin();
chat = new AppChat();
user = new UserDataManager();
2024-07-03 14:43:11 +08:00
emu = new AppEmu();
netgame = new AppNetGame();
2024-06-28 18:08:25 +08:00
}
public static bool Connect(string IP, int port)
{
return networkHelper.Init(IP, port);
}
public static void Close()
{
AppAxibugEmuOnline.log.Info("停止");
}
static void OnNoSugarNetLog(int LogLevel, string msg)
{
Debug.Log("[AxibugEmuOnline]:"+msg);
}
}
}