增加新版出战卡组选定功能和删除功能

This commit is contained in:
YiHan0621
2025-09-19 18:32:19 +08:00
parent 6e3e6b59a5
commit fadcb295d2
5 changed files with 211 additions and 64 deletions

View File

@@ -35,12 +35,13 @@ namespace TcgEngine.UI
deck_dropdown.AddOption("random", "Random");
//Add standard decks
// 添加标准卡组
foreach (DeckData deck in GameplayData.Get().free_decks)
{
deck_dropdown.AddOption(deck.id, deck.title);
}
// 添加自定义卡组
UserData udata = Authenticator.Get().UserData;
if (udata != null)
{
@@ -98,6 +99,7 @@ namespace TcgEngine.UI
public void SelectDeck(string deck)
{
Debug.Log($"111{deck}");
//Make sure deck exists, to prevent assigning invalid deck
UserData udata = Authenticator.Get().UserData;
UserDeckData udeck = udata?.GetDeck(deck);