Compare commits
3 Commits
1355440e2a
...
c05176ffac
Author | SHA1 | Date |
---|---|---|
|
c05176ffac | |
|
0dc2bdcc86 | |
|
bbd64e7e6b |
Binary file not shown.
|
@ -46,7 +46,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
toolId: 0
|
toolId: 0
|
||||||
toolOrMaterial: 0
|
toolOrMaterial: 1
|
||||||
--- !u!1001 &7874918607128331659
|
--- !u!1001 &7874918607128331659
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -46,7 +46,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
toolId: 0
|
toolId: 0
|
||||||
toolOrMaterial: 0
|
toolOrMaterial: 1
|
||||||
--- !u!1001 &8382786867262178121
|
--- !u!1001 &8382786867262178121
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -104,7 +104,7 @@ MonoBehaviour:
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_Sprite: {fileID: 0}
|
m_Sprite: {fileID: 21300000, guid: cf802d021b1c3774c97253ee50d9710c, type: 3}
|
||||||
m_Type: 0
|
m_Type: 0
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
|
@ -204,7 +204,7 @@ MonoBehaviour:
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_Sprite: {fileID: 0}
|
m_Sprite: {fileID: 21300000, guid: f183d6f3c19e2fd4983977a2189b3704, type: 3}
|
||||||
m_Type: 0
|
m_Type: 0
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
|
@ -313,7 +313,7 @@ MonoBehaviour:
|
||||||
m_MinValue: 0
|
m_MinValue: 0
|
||||||
m_MaxValue: 1
|
m_MaxValue: 1
|
||||||
m_WholeNumbers: 0
|
m_WholeNumbers: 0
|
||||||
m_Value: 1
|
m_Value: 0.714
|
||||||
m_OnValueChanged:
|
m_OnValueChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
|
@ -452,7 +452,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 0, g: 0.33962262, b: 0.27345648, a: 1}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 1
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
|
|
|
@ -144,4 +144,22 @@ public enum E_MessageType
|
||||||
/// 错误
|
/// 错误
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Error,
|
Error,
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum E_SceneType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 办公室
|
||||||
|
/// </summary>
|
||||||
|
Office,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 工器具间
|
||||||
|
/// </summary>
|
||||||
|
TooLRoom,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 现场
|
||||||
|
/// </summary>
|
||||||
|
Site,
|
||||||
}
|
}
|
|
@ -32,7 +32,7 @@ public class DataManager : BaseManager<DataManager>
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 虚拟仿真系统
|
/// 虚拟仿真系统
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private Dictionary<int,TB_System> systemDic =new Dictionary<int, TB_System>();
|
private Dictionary<int, TB_System> systemDic = new Dictionary<int, TB_System>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设备类型
|
/// 设备类型
|
||||||
|
@ -52,7 +52,7 @@ public class DataManager : BaseManager<DataManager>
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 初始化
|
/// 初始化
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Init()
|
public void Init()
|
||||||
{
|
{
|
||||||
schemeDic = GameManager.BinaryMgr.GetTable<TB_SchemeContainer>().dataDic;
|
schemeDic = GameManager.BinaryMgr.GetTable<TB_SchemeContainer>().dataDic;
|
||||||
processDic = GameManager.BinaryMgr.GetTable<TB_ProcessContainer>().dataDic;
|
processDic = GameManager.BinaryMgr.GetTable<TB_ProcessContainer>().dataDic;
|
||||||
|
@ -68,7 +68,7 @@ public class DataManager : BaseManager<DataManager>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public D_Scheme GetSchemeData(int id)
|
public D_Scheme GetSchemeData(int id)
|
||||||
{
|
{
|
||||||
D_Scheme d_Scheme = new D_Scheme();
|
D_Scheme d_Scheme = new D_Scheme();
|
||||||
//获取方案数据
|
//获取方案数据
|
||||||
|
@ -86,7 +86,7 @@ public class DataManager : BaseManager<DataManager>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="schemeId"></param>
|
/// <param name="schemeId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private List<D_Process> GetD_Processes(int schemeId)
|
private List<D_Process> GetD_Processes(int schemeId)
|
||||||
{
|
{
|
||||||
List<D_Process> d_Processes = new List<D_Process>();
|
List<D_Process> d_Processes = new List<D_Process>();
|
||||||
//获取方案流程数据
|
//获取方案流程数据
|
||||||
|
@ -114,7 +114,7 @@ public class DataManager : BaseManager<DataManager>
|
||||||
public List<D_SubProcess> GetD_SubProcesses(int schemeId, int processId)
|
public List<D_SubProcess> GetD_SubProcesses(int schemeId, int processId)
|
||||||
{
|
{
|
||||||
List<D_SubProcess> d_SubProcesses = new List<D_SubProcess>();
|
List<D_SubProcess> d_SubProcesses = new List<D_SubProcess>();
|
||||||
foreach(var item in subProcessDic.Values)
|
foreach (var item in subProcessDic.Values)
|
||||||
{
|
{
|
||||||
if (item.schemeId == schemeId && item.processId == processId)
|
if (item.schemeId == schemeId && item.processId == processId)
|
||||||
{
|
{
|
||||||
|
@ -140,10 +140,10 @@ public class DataManager : BaseManager<DataManager>
|
||||||
/// <param name="processId"></param>
|
/// <param name="processId"></param>
|
||||||
/// <param name="subProcessStepId"></param>
|
/// <param name="subProcessStepId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private List<D_SubProcessStep> GetD_SubProcessSteps(int schemeId, int processId,int subProcessId)
|
private List<D_SubProcessStep> GetD_SubProcessSteps(int schemeId, int processId, int subProcessId)
|
||||||
{
|
{
|
||||||
List<D_SubProcessStep> d_SubProcessSteps = new List<D_SubProcessStep>();
|
List<D_SubProcessStep> d_SubProcessSteps = new List<D_SubProcessStep>();
|
||||||
foreach(var step in subProcessStepDic.Values)
|
foreach (var step in subProcessStepDic.Values)
|
||||||
{
|
{
|
||||||
if (step.schemeId == schemeId && step.processId == processId && step.subProcessId == subProcessId)
|
if (step.schemeId == schemeId && step.processId == processId && step.subProcessId == subProcessId)
|
||||||
{
|
{
|
||||||
|
@ -167,20 +167,20 @@ public class DataManager : BaseManager<DataManager>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="systemId"></param>
|
/// <param name="systemId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public TB_System GetSystemInfo(int systemId)
|
public TB_System GetSystemInfo(int systemId)
|
||||||
{
|
{
|
||||||
if (systemDic.ContainsKey(systemId))
|
if (systemDic.ContainsKey(systemId))
|
||||||
{
|
{
|
||||||
return systemDic[systemId];
|
return systemDic[systemId];
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取报告
|
/// 获取报告
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
public R_Scheme GetSchemeReport(int id)
|
public R_Scheme GetSchemeReport(int id)
|
||||||
{
|
{
|
||||||
R_Scheme r_Scheme = new R_Scheme();
|
R_Scheme r_Scheme = new R_Scheme();
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,21 @@ public class GameManager : SingletonAutoMono<GameManager>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static HandsOnTrainingMgr HandsOnTrainingMgr { get; private set; }
|
public static HandsOnTrainingMgr HandsOnTrainingMgr { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 学习或者练习的管理类
|
||||||
|
/// </summary>
|
||||||
public static StudyOrPracticeMgr StudyOrPracticeMgr { get; private set; }
|
public static StudyOrPracticeMgr StudyOrPracticeMgr { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 背包管理类
|
||||||
|
/// </summary>
|
||||||
|
public static PacksackBagMgr PacksackBagMgr { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 工具材料管理类
|
||||||
|
/// </summary>
|
||||||
|
public static ToolAndmaterialMgr ToolAndmaterialMgr { get; private set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
/// <summary>
|
||||||
|
/// 负责工具材料包管理
|
||||||
|
/// </summary>
|
||||||
|
public class PacksackBagMgr : BaseManager<PacksackBagMgr>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 65b74ada67aa1084f80d58b3d6f2f71d
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -104,7 +104,7 @@ public class ProcessManager : BaseManager<ProcessManager>
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 倒计时
|
/// 倒计时
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="time"></param>
|
/// <param name="time">倒计时多久</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private IEnumerator CountDown(int time)
|
private IEnumerator CountDown(int time)
|
||||||
{
|
{
|
||||||
|
@ -118,7 +118,6 @@ public class ProcessManager : BaseManager<ProcessManager>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 结束
|
/// 结束
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
/// <summary>
|
||||||
|
/// 正在使用的工具/材料管理类
|
||||||
|
/// </summary>
|
||||||
|
public class ToolAndmaterialMgr : BaseManager<ToolAndmaterialMgr>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 460bb2208a770274ba767fc886198034
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,91 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
/// <summary>
|
||||||
|
/// 右侧菜单按钮
|
||||||
|
/// </summary>
|
||||||
|
public class UI_MenuPanel : BasePanel
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 存储创建出来的btn
|
||||||
|
/// </summary>
|
||||||
|
private List<GameObject> itemObjs =new List<GameObject>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 初始化
|
||||||
|
/// </summary>
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
CreateMenuBtn(E_SceneType.Office);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建菜单按钮
|
||||||
|
/// 根据所属空间创建 对应的按钮,
|
||||||
|
/// 还需要根据需求设定是否激活
|
||||||
|
/// </summary>
|
||||||
|
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 并记录
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清空创建出来的
|
||||||
|
/// </summary>
|
||||||
|
private void ClearMenuBtn()
|
||||||
|
{
|
||||||
|
if (itemObjs.Count == 0)
|
||||||
|
return;
|
||||||
|
for (int i = 0; i < itemObjs.Count; i++)
|
||||||
|
{
|
||||||
|
Destroy(itemObjs[i]);
|
||||||
|
}
|
||||||
|
itemObjs.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示面板
|
||||||
|
/// </summary>
|
||||||
|
public override void ShowMe()
|
||||||
|
{
|
||||||
|
GameManager.EventMgr.AddEventListener<E_SceneType>(Enum_EventType.SwitchScene, CreateMenuBtn);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 隐藏面板
|
||||||
|
/// </summary>
|
||||||
|
public override void HideMe()
|
||||||
|
{
|
||||||
|
GameManager.EventMgr.RemoveEventListener<E_SceneType>(Enum_EventType.SwitchScene, CreateMenuBtn);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 按钮点击
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="btnName"></param>
|
||||||
|
protected override void OnClick(string btnName)
|
||||||
|
{
|
||||||
|
switch (btnName)
|
||||||
|
{
|
||||||
|
case "":
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3aa727d14c599074b9ab6651b6289055
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -27,7 +27,6 @@ public class UI_SelectModeOrDeviceTitlePanel : BasePanel
|
||||||
break;
|
break;
|
||||||
case E_ModeType.Exam:
|
case E_ModeType.Exam:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GetControl<Text>("Text_ModeType").text = mode;
|
GetControl<Text>("Text_ModeType").text = mode;
|
||||||
|
@ -81,12 +80,18 @@ public class UI_SelectModeOrDeviceTitlePanel : BasePanel
|
||||||
/// <param name="btnName"></param>
|
/// <param name="btnName"></param>
|
||||||
protected override void OnClick(string btnName)
|
protected override void OnClick(string btnName)
|
||||||
{
|
{
|
||||||
base.OnClick(btnName);
|
|
||||||
switch (btnName)
|
switch (btnName)
|
||||||
{
|
{
|
||||||
//TODO 退出提示框
|
//TODO 退出提示框
|
||||||
case "Btn_Quit":
|
case "Btn_Quit":
|
||||||
print("退出应用");
|
print("退出应用");
|
||||||
|
GameManager.UIMgr.ShowPanel<UI_MessagePanel>(E_UI_Layer.System, (panel) =>
|
||||||
|
{
|
||||||
|
panel.Init("提示", "确定退出应用吗?", E_MessageType.Warning, () =>
|
||||||
|
{
|
||||||
|
Application.Quit();
|
||||||
|
});
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,4 +22,9 @@ public enum Enum_EventType
|
||||||
/// 选择/切换模式
|
/// 选择/切换模式
|
||||||
/// </summary>
|
/// </summary>
|
||||||
SwitchMode,
|
SwitchMode,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 切换场景
|
||||||
|
/// </summary>
|
||||||
|
SwitchScene,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue