diff --git a/Assets/ArtRes/Excel/Config.xlsx b/Assets/ArtRes/Excel/Config.xlsx index 14c6276..22b8b03 100644 Binary files a/Assets/ArtRes/Excel/Config.xlsx and b/Assets/ArtRes/Excel/Config.xlsx differ diff --git a/Assets/ArtRes/Excel/~$Config.xlsx.meta b/Assets/ArtRes/Excel/~$Config.xlsx.meta deleted file mode 100644 index 603c152..0000000 --- a/Assets/ArtRes/Excel/~$Config.xlsx.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: bbaeff621a49deb45b058390ad6519c5 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Project/Enum/Enums.cs b/Assets/Scripts/Project/Enum/Enums.cs index 8489dd2..8522d89 100644 --- a/Assets/Scripts/Project/Enum/Enums.cs +++ b/Assets/Scripts/Project/Enum/Enums.cs @@ -144,4 +144,22 @@ public enum E_MessageType /// 错误 /// 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, }