hch
2025-08-29 de72e9e7994ccc9a4d8be18edf6a9ee860ef18ab
50 【主界面】核心主体 - 内政临时界面
2个文件已修改
3个文件已添加
78 ■■■■■ 已修改文件
Main/System/InternalAffairs.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/InternalAffairs/AffairBaseWin.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/InternalAffairs/AffairBaseWin.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Main/FuncsBaseWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Main/MainWin.cs 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/InternalAffairs.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6c6d94d09b5fc3546a5cb9c2488e37fa
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/InternalAffairs/AffairBaseWin.cs
New file
@@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// 内政
/// </summary>
public class AffairBaseWin : UIBase
{
    [SerializeField] Button bagBtn;
    protected override void InitComponent()
    {
        bagBtn.AddListener(() =>
        {
            UIManager.Instance.OpenWindow<RolePackWin>();
        }
        );
    }
}
Main/System/InternalAffairs/AffairBaseWin.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 670c8663456dd724497730fe8b72e23b
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/Main/FuncsBaseWin.cs
@@ -58,7 +58,7 @@
    /// <summary>
    /// 选择标签
    /// </summary>
    protected void SelectBottomTab(int index)
    protected virtual void SelectBottomTab(int index)
    {
        // 如果点击当前已选中的标签,不做处理
        if (functionOrder == index && currentSubUI != null)
Main/System/Main/MainWin.cs
@@ -46,6 +46,31 @@
    }
    protected override void SelectBottomTab(int index)
    {
        if (index == 3)
        {
            //挑战特殊显示逻辑
            return;
        }
        // 如果点击当前已选中的标签,不做处理
        if (functionOrder == index && currentSubUI != null)
        {
            return;
        }
        // 更新当前选中的标签索引
            functionOrder = index;
        // 关闭当前打开的子界面
        CloseCurrentSubUI();
        // 根据选中的标签打开对应的界面
        OpenSubUIByTabIndex();
    }
    /// <summary>
    /// 更新玩家信息
    /// </summary>
@@ -147,17 +172,17 @@
                Debug.Log("打开主城界面");
                break;
            case 1:
                currentSubUI = UIManager.Instance.OpenWindow<RolePackWin>();
                currentSubUI = UIManager.Instance.OpenWindow<AffairBaseWin>();
                Debug.Log("打开内政界面");
                break;
            case 2:
                currentSubUI = UIManager.Instance.OpenWindow<HeroBaseWin>(0);
                Debug.Log("打开武将界面");
                break;
            case 3:
                // currentSubUI = UIManager.Instance.OpenUI<QuestUI>();
                Debug.Log("打开挑战界面");
                break;
            // case 3:
            //     // currentSubUI = UIManager.Instance.OpenUI<QuestUI>();
            //     Debug.Log("打开挑战界面");
            //     break;
            case 4:
                currentSubUI = UIManager.Instance.OpenWindow<GuildBaseWin>();
                break;