1
This commit is contained in:
@@ -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:
|
||||
Reference in New Issue
Block a user