From c05176ffac9aa05135bc46dc288ec6fe71e9f55e Mon Sep 17 00:00:00 2001 From: liuyu <272912176@qq.com> Date: Fri, 2 Aug 2024 17:55:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ArtRes/Excel/Config.xlsx | Bin 18503 -> 18530 bytes Assets/ArtRes/Excel/~$Config.xlsx.meta | 7 -- Assets/Scripts/Project/Enum/Enums.cs | 18 ++++ Assets/Scripts/Project/Manager/DataManager.cs | 20 ++-- .../Scripts/Project/Manager/PacksackBagMgr.cs | 2 +- .../Scripts/Project/Manager/ProcessManager.cs | 3 +- .../Project/Manager/ToolAndmaterialMgr.cs | 2 +- .../Project/UI/UI_Panel/UI_MenuPanel.cs | 91 ++++++++++++++++++ .../Project/UI/UI_Panel/UI_MenuPanel.cs.meta | 11 +++ .../UI_SelectModeOrDeviceTitlePanel.cs | 9 +- .../ProjectBase/EventCenter/Enum_EventType.cs | 5 + 11 files changed, 145 insertions(+), 23 deletions(-) delete mode 100644 Assets/ArtRes/Excel/~$Config.xlsx.meta create mode 100644 Assets/Scripts/Project/UI/UI_Panel/UI_MenuPanel.cs create mode 100644 Assets/Scripts/Project/UI/UI_Panel/UI_MenuPanel.cs.meta diff --git a/Assets/ArtRes/Excel/Config.xlsx b/Assets/ArtRes/Excel/Config.xlsx index 14c62769f324876c2241bdd1eb2c47a3dfb8f6f7..22b8b03c4f5399cdae71cbc9b2c402c1f105e8d0 100644 GIT binary patch delta 4620 zcmZ8l2QVC5*S6TzJBhNQTP=vyW0lpScTs{@ud6N5vQ`%*+UlL?Y!HMfi7tplCpsZv zbs>V_Pu_3-|C{;mow+l2?sJ}V=gc{C%1{bmBL&bf1R!*n(!^p$0c>a`-9Axj)$>P7 z94GRP7~^I$4FRPYhKv*!pq=xVDM?Nrp~aM+pa$D9AkAF2#zG2dzwhtc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?LCK6@9w2j(R3zNOjEwHZ)MRrePvgA@b$MtHiS%*U#NyAU6dv?&C? znGv4z=e_JbN~EhY^o$@``mTphQh!{zyYI95!z#${z;n-Bv~bY8fH1rtbh7g#p_Dy; zZ8TW%F{*a3Z0VFAB_PC&RlAu>37ABU>OcWN6oaljKpds5i~7&!V_tU<07I4QDUnBN zp_;XLQO9}`0B01xzBa?YI2l=FfNW@3RDf3~3aWP Error, +} + +public enum E_SceneType +{ + /// + /// 办公室 + /// + Office, + + /// + /// 工器具间 + /// + TooLRoom, + + /// + /// 现场 + /// + Site, } \ No newline at end of file diff --git a/Assets/Scripts/Project/Manager/DataManager.cs b/Assets/Scripts/Project/Manager/DataManager.cs index ccc3a82..c160435 100644 --- a/Assets/Scripts/Project/Manager/DataManager.cs +++ b/Assets/Scripts/Project/Manager/DataManager.cs @@ -32,7 +32,7 @@ public class DataManager : BaseManager /// /// 虚拟仿真系统 /// - private Dictionary systemDic =new Dictionary(); + private Dictionary systemDic = new Dictionary(); /// /// 设备类型 @@ -52,7 +52,7 @@ public class DataManager : BaseManager /// /// 初始化 /// - public void Init() + public void Init() { schemeDic = GameManager.BinaryMgr.GetTable().dataDic; processDic = GameManager.BinaryMgr.GetTable().dataDic; @@ -68,7 +68,7 @@ public class DataManager : BaseManager /// /// /// - public D_Scheme GetSchemeData(int id) + public D_Scheme GetSchemeData(int id) { D_Scheme d_Scheme = new D_Scheme(); //获取方案数据 @@ -86,7 +86,7 @@ public class DataManager : BaseManager /// /// /// - private List GetD_Processes(int schemeId) + private List GetD_Processes(int schemeId) { List d_Processes = new List(); //获取方案流程数据 @@ -114,7 +114,7 @@ public class DataManager : BaseManager public List GetD_SubProcesses(int schemeId, int processId) { List d_SubProcesses = new List(); - foreach(var item in subProcessDic.Values) + foreach (var item in subProcessDic.Values) { if (item.schemeId == schemeId && item.processId == processId) { @@ -140,10 +140,10 @@ public class DataManager : BaseManager /// /// /// - private List GetD_SubProcessSteps(int schemeId, int processId,int subProcessId) + private List GetD_SubProcessSteps(int schemeId, int processId, int subProcessId) { List d_SubProcessSteps = new List(); - foreach(var step in subProcessStepDic.Values) + foreach (var step in subProcessStepDic.Values) { if (step.schemeId == schemeId && step.processId == processId && step.subProcessId == subProcessId) { @@ -167,20 +167,20 @@ public class DataManager : BaseManager /// /// /// - public TB_System GetSystemInfo(int systemId) + public TB_System GetSystemInfo(int systemId) { if (systemDic.ContainsKey(systemId)) { return systemDic[systemId]; } - return null; + return null; } /// /// 获取报告 /// /// - public R_Scheme GetSchemeReport(int id) + public R_Scheme GetSchemeReport(int id) { R_Scheme r_Scheme = new R_Scheme(); diff --git a/Assets/Scripts/Project/Manager/PacksackBagMgr.cs b/Assets/Scripts/Project/Manager/PacksackBagMgr.cs index 37105e1..f384ad5 100644 --- a/Assets/Scripts/Project/Manager/PacksackBagMgr.cs +++ b/Assets/Scripts/Project/Manager/PacksackBagMgr.cs @@ -2,7 +2,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; /// -/// 𹤾߲ϰ +/// 负责工具材料包管理 /// public class PacksackBagMgr : BaseManager { diff --git a/Assets/Scripts/Project/Manager/ProcessManager.cs b/Assets/Scripts/Project/Manager/ProcessManager.cs index 734461a..1618e2f 100644 --- a/Assets/Scripts/Project/Manager/ProcessManager.cs +++ b/Assets/Scripts/Project/Manager/ProcessManager.cs @@ -104,7 +104,7 @@ public class ProcessManager : BaseManager /// /// 倒计时 /// - /// + /// 倒计时多久 /// private IEnumerator CountDown(int time) { @@ -118,7 +118,6 @@ public class ProcessManager : BaseManager } } - /// /// 结束 /// diff --git a/Assets/Scripts/Project/Manager/ToolAndmaterialMgr.cs b/Assets/Scripts/Project/Manager/ToolAndmaterialMgr.cs index 55d5d0c..1d441de 100644 --- a/Assets/Scripts/Project/Manager/ToolAndmaterialMgr.cs +++ b/Assets/Scripts/Project/Manager/ToolAndmaterialMgr.cs @@ -2,7 +2,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; /// -/// ʹõĹ/Ϲ +/// 正在使用的工具/材料管理类 /// public class ToolAndmaterialMgr : BaseManager { diff --git a/Assets/Scripts/Project/UI/UI_Panel/UI_MenuPanel.cs b/Assets/Scripts/Project/UI/UI_Panel/UI_MenuPanel.cs new file mode 100644 index 0000000..fad6476 --- /dev/null +++ b/Assets/Scripts/Project/UI/UI_Panel/UI_MenuPanel.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +/// +/// 右侧菜单按钮 +/// +public class UI_MenuPanel : BasePanel +{ + + /// + /// 存储创建出来的btn + /// + private List itemObjs =new List(); + + /// + /// 初始化 + /// + public void Init() + { + CreateMenuBtn(E_SceneType.Office); + } + + /// + /// 创建菜单按钮 + /// 根据所属空间创建 对应的按钮, + /// 还需要根据需求设定是否激活 + /// + private void CreateMenuBtn(E_SceneType type) + { + //清空已经穿件出来的 + ClearMenuBtn(); + //获取所在场景中的btn数据 + switch (type) + { + case E_SceneType.Office: + break; + case E_SceneType.TooLRoom: + break; + case E_SceneType.Site: + break; + } + + //根据所在场景 创建新的btn 并记录 + } + + /// + /// 清空创建出来的 + /// + private void ClearMenuBtn() + { + if (itemObjs.Count == 0) + return; + for (int i = 0; i < itemObjs.Count; i++) + { + Destroy(itemObjs[i]); + } + itemObjs.Clear(); + } + + /// + /// 显示面板 + /// + public override void ShowMe() + { + GameManager.EventMgr.AddEventListener(Enum_EventType.SwitchScene, CreateMenuBtn); + } + + /// + /// 隐藏面板 + /// + public override void HideMe() + { + GameManager.EventMgr.RemoveEventListener(Enum_EventType.SwitchScene, CreateMenuBtn); + } + + /// + /// 按钮点击 + /// + /// + protected override void OnClick(string btnName) + { + switch (btnName) + { + case "": + + + break; + } + } +} diff --git a/Assets/Scripts/Project/UI/UI_Panel/UI_MenuPanel.cs.meta b/Assets/Scripts/Project/UI/UI_Panel/UI_MenuPanel.cs.meta new file mode 100644 index 0000000..7dc951f --- /dev/null +++ b/Assets/Scripts/Project/UI/UI_Panel/UI_MenuPanel.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3aa727d14c599074b9ab6651b6289055 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Project/UI/UI_Panel/UI_SelectModeOrDeviceTitlePanel.cs b/Assets/Scripts/Project/UI/UI_Panel/UI_SelectModeOrDeviceTitlePanel.cs index 3e3fd97..1ded2ee 100644 --- a/Assets/Scripts/Project/UI/UI_Panel/UI_SelectModeOrDeviceTitlePanel.cs +++ b/Assets/Scripts/Project/UI/UI_Panel/UI_SelectModeOrDeviceTitlePanel.cs @@ -27,7 +27,6 @@ public class UI_SelectModeOrDeviceTitlePanel : BasePanel break; case E_ModeType.Exam: break; - } GetControl("Text_ModeType").text = mode; @@ -81,12 +80,18 @@ public class UI_SelectModeOrDeviceTitlePanel : BasePanel /// protected override void OnClick(string btnName) { - base.OnClick(btnName); switch (btnName) { //TODO 退出提示框 case "Btn_Quit": print("退出应用"); + GameManager.UIMgr.ShowPanel(E_UI_Layer.System, (panel) => + { + panel.Init("提示", "确定退出应用吗?", E_MessageType.Warning, () => + { + Application.Quit(); + }); + }); break; } } diff --git a/Assets/Scripts/ProjectBase/EventCenter/Enum_EventType.cs b/Assets/Scripts/ProjectBase/EventCenter/Enum_EventType.cs index d9453f1..15d5a66 100644 --- a/Assets/Scripts/ProjectBase/EventCenter/Enum_EventType.cs +++ b/Assets/Scripts/ProjectBase/EventCenter/Enum_EventType.cs @@ -22,4 +22,9 @@ public enum Enum_EventType /// 选择/切换模式 /// SwitchMode, + + /// + /// 切换场景 + /// + SwitchScene, }