This commit is contained in:
YiHan0621
2025-09-04 18:19:05 +08:00
parent 1f8e74b6c5
commit bcb4f6fd3c
5 changed files with 50 additions and 9 deletions

View File

@@ -25,17 +25,17 @@ namespace TcgEngine.Client
private void Start()
{
Debug.LogError("------------"+gameObject.name+"-------------------");
// 在游戏客户端启动时初始化任务系统
client = FindFirstObjectByType<GameClient>();
client = GameClient.Get();
Debug.LogError(client.name);
if (client != null)
{
// 玩家连接到游戏服务器时触发任务检查
client.onConnectServer += OnConnectToServer;
Debug.LogError(client.onConnectServer + "任务系统初始化成功");
}
else
{
Debug.LogError($"---{client}为空----");
}
if (TaskManager.Instance != null)
@@ -61,7 +61,6 @@ namespace TcgEngine.Client
TaskManager taskManager = TaskManager.Instance;
if (taskManager != null)
{
Debug.LogError("初始化完成");
taskManager.OnPlayerLogin();
taskPanel.ShowTasks(taskManager.GetAllTasks());
}