This commit is contained in:
MuHua-123
2025-09-18 16:56:00 +08:00
parent 5d8f76b3e6
commit 7324361948
385 changed files with 22988 additions and 198 deletions
@@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
using MuHua;
/// <summary>
/// 背包页面
/// </summary>
public class UIBackpackPage : ModuleUIPage {
public VisualTreeAsset inventorySlot;
private UIInventory inventory;
public override VisualElement Element => root.Q<VisualElement>("BackpackPage");
public VisualElement Inventory => Q<VisualElement>("Inventory");
protected void Awake() {
inventory = new UIInventory(Inventory, inventorySlot);
ModuleUI.OnJumpPage += ModuleUI_OnJumpPage;
}
private void ModuleUI_OnJumpPage(Page page) {
Element.EnableInClassList("document-page-hide", page != Page.Backpack);
if (page != Page.Backpack) { return; }
inventory.Settings(SingleManager.I.inventory);
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 255d109f8aae559419ae63856abc96c5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: