首页牌组初始化
This commit is contained in:
@@ -136,8 +136,7 @@ namespace TcgEngine.Gameplay
|
||||
// 从服务器API获取任务配置
|
||||
string url = ApiClient.ServerURL + "/api/tasks";
|
||||
WebResponse res = await ApiClient.Get().SendGetRequest(url);
|
||||
Debug.LogError("从服务器API获取任务配置" + res.data + res.status);
|
||||
Debug.LogError(res.success);
|
||||
Debug.Log("从服务器API获取任务配置" + res.data + res.status);
|
||||
if (res.success)
|
||||
{
|
||||
// 解析任务配置数据
|
||||
@@ -650,7 +649,7 @@ namespace TcgEngine.Gameplay
|
||||
{
|
||||
allTasks = Resources.LoadAll<TaskData>("Tasks");
|
||||
}
|
||||
|
||||
|
||||
var loginTask = allTasks.FirstOrDefault(t => t.isDailyTask && t.condition == TaskConditionType.LoginGame);
|
||||
|
||||
if (loginTask != null)
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TcgEngine.Client;
|
||||
using TcgEngine.Gameplay;
|
||||
using Unity.VisualScripting;
|
||||
|
||||
namespace TcgEngine.UI
|
||||
@@ -42,6 +43,7 @@ namespace TcgEngine.UI
|
||||
//Set default settings
|
||||
Application.targetFrameRate = 120;
|
||||
GameClient.game_settings = GameSettings.Default;
|
||||
Debug.Log("WOWO_Awake");
|
||||
}
|
||||
|
||||
private void Start()
|
||||
@@ -62,6 +64,7 @@ namespace TcgEngine.UI
|
||||
AfterLogin();
|
||||
else
|
||||
RefreshLogin();
|
||||
// TaskManager.Instance.SavePlayerData();
|
||||
}
|
||||
|
||||
void Update()
|
||||
@@ -267,6 +270,17 @@ namespace TcgEngine.UI
|
||||
StartMathmaking(GameMode.Ranked, "");
|
||||
}
|
||||
|
||||
public void OnUiFrameShow(UIPanel panel)
|
||||
{
|
||||
if (!Authenticator.Get().IsConnected())
|
||||
{
|
||||
FadeToScene("LoginMenu");
|
||||
return;
|
||||
}
|
||||
|
||||
panel.Show();
|
||||
}
|
||||
|
||||
public void OnClickAdventure()
|
||||
{
|
||||
AdventurePanel.Get().Show();
|
||||
|
||||
@@ -6,8 +6,8 @@ using UnityEngine.UI;
|
||||
namespace TcgEngine.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Selection of your starter deck
|
||||
/// Will only appear in the main menu when in API mode with a new account
|
||||
/// 初始套牌选择
|
||||
/// 仅当处于 API 模式且使用新账号时,才会在主菜单中显示
|
||||
/// </summary>
|
||||
|
||||
public class StarterDeckPanel : UIPanel
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace TcgEngine.UI
|
||||
{
|
||||
public string group;
|
||||
public bool active;
|
||||
public GameObject highlight;
|
||||
// public GameObject highlight;
|
||||
public UIPanel ui_panel;
|
||||
|
||||
public UnityAction onClick;
|
||||
|
||||
Reference in New Issue
Block a user