添加步骤提示逻辑
This commit is contained in:
parent
c140c0fd5d
commit
dbde0b3f2a
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -1208,9 +1208,9 @@ Transform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 919132148358585192}
|
||||
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -1.3153876, y: 0.66252714, z: -1.2924924}
|
||||
m_LocalScale: {x: 0.01, y: 0.01, z: 0.01}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.024442196, y: 0.88570684, z: -1.0056937}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 5568970732483254973}
|
||||
|
@ -1554,6 +1554,8 @@ GameObject:
|
|||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 543450652349448658}
|
||||
- component: {fileID: 919132148358585194}
|
||||
- component: {fileID: 919132148358585193}
|
||||
m_Layer: 0
|
||||
m_Name: "\u624B\u673A"
|
||||
m_TagString: Untagged
|
||||
|
@ -1561,6 +1563,32 @@ GameObject:
|
|||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &919132148358585193
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 919132148358585192}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a85b91b2d2519347b583e108b24f3c8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
downIndex: 0
|
||||
--- !u!65 &919132148358585194
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 919132148358585192}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.08355041, y: 0.030540586, z: 0.17206752}
|
||||
m_Center: {x: -0.00045210123, y: 0.0055265427, z: 0.00059360266}
|
||||
--- !u!1 &919132148708085627
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -5221,9 +5249,9 @@ Transform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8049962175932441955}
|
||||
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 133.98299, y: 22.317968, z: 28.679873}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.01, y: 0.01, z: 0.01}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 543450652349448658}
|
||||
|
@ -6901,7 +6929,6 @@ GameObject:
|
|||
- component: {fileID: 5568970732483254973}
|
||||
- component: {fileID: 9006472541337010437}
|
||||
- component: {fileID: 7964202602271020417}
|
||||
- component: {fileID: 9006472541337010439}
|
||||
- component: {fileID: 9006472541337010438}
|
||||
m_Layer: 0
|
||||
m_Name: shouji1
|
||||
|
@ -7517,23 +7544,164 @@ MonoBehaviour:
|
|||
m_GameObject: {fileID: 8049962175932441955}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a85b91b2d2519347b583e108b24f3c8, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
downIndex: 0
|
||||
--- !u!65 &9006472541337010439
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8049962175932441955}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 7.149084, y: 0.81946564, z: 16.000008}
|
||||
m_Center: {x: -0.000009536743, y: 0.34326786, z: -0.000002861023}
|
||||
profile: {fileID: 0}
|
||||
profileSync: 0
|
||||
previewInEditor: 1
|
||||
camerasLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
effectGroup: 0
|
||||
effectGroupLayer:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
effectNameFilter:
|
||||
combineMeshes: 0
|
||||
alphaCutOff: 0
|
||||
cullBackFaces: 1
|
||||
ignoreObjectVisibility: 0
|
||||
reflectionProbes: 0
|
||||
GPUInstancing: 1
|
||||
depthClip: 0
|
||||
cameraDistanceFade: 0
|
||||
cameraDistanceFadeNear: 0
|
||||
cameraDistanceFadeFar: 1000
|
||||
normalsOption: 0
|
||||
ignore: 0
|
||||
_highlighted: 0
|
||||
fadeInDuration: 0
|
||||
fadeOutDuration: 0
|
||||
flipY: 0
|
||||
constantWidth: 1
|
||||
subMeshMask: -1
|
||||
overlay: 0
|
||||
overlayMode: 0
|
||||
overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
|
||||
overlayAnimationSpeed: 1
|
||||
overlayMinIntensity: 0.5
|
||||
overlayBlending: 1
|
||||
overlayTexture: {fileID: 0}
|
||||
overlayTextureUVSpace: 0
|
||||
overlayTextureScale: 1
|
||||
outline: 1
|
||||
outlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
outlineColorStyle: 0
|
||||
outlineGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||
ctime0: 0
|
||||
ctime1: 65535
|
||||
ctime2: 0
|
||||
ctime3: 0
|
||||
ctime4: 0
|
||||
ctime5: 0
|
||||
ctime6: 0
|
||||
ctime7: 0
|
||||
atime0: 0
|
||||
atime1: 65535
|
||||
atime2: 0
|
||||
atime3: 0
|
||||
atime4: 0
|
||||
atime5: 0
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_NumColorKeys: 2
|
||||
m_NumAlphaKeys: 2
|
||||
outlineGradientInLocalSpace: 0
|
||||
outlineWidth: 0.45
|
||||
outlineQuality: 3
|
||||
outlineDownsampling: 2
|
||||
outlineVisibility: 0
|
||||
glowBlendMode: 0
|
||||
outlineOptimalBlit: 1
|
||||
outlineBlitDebug: 0
|
||||
outlineIndependent: 0
|
||||
glow: 0
|
||||
glowWidth: 0.4
|
||||
glowQuality: 3
|
||||
glowDownsampling: 2
|
||||
glowHQColor: {r: 0.64, g: 1, b: 0, a: 1}
|
||||
glowDithering: 1
|
||||
glowMagicNumber1: 0.75
|
||||
glowMagicNumber2: 0.5
|
||||
glowAnimationSpeed: 1
|
||||
glowVisibility: 0
|
||||
glowOptimalBlit: 1
|
||||
glowBlitDebug: 0
|
||||
glowBlendPasses: 1
|
||||
glowPasses:
|
||||
- offset: 4
|
||||
alpha: 0.1
|
||||
color: {r: 0.64, g: 1, b: 0, a: 1}
|
||||
- offset: 3
|
||||
alpha: 0.2
|
||||
color: {r: 0.64, g: 1, b: 0, a: 1}
|
||||
- offset: 2
|
||||
alpha: 0.3
|
||||
color: {r: 0.64, g: 1, b: 0, a: 1}
|
||||
- offset: 1
|
||||
alpha: 0.4
|
||||
color: {r: 0.64, g: 1, b: 0, a: 1}
|
||||
glowIgnoreMask: 0
|
||||
innerGlow: 0
|
||||
innerGlowWidth: 1
|
||||
innerGlowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
innerGlowVisibility: 0
|
||||
targetFX: 0
|
||||
targetFXTexture: {fileID: 0}
|
||||
targetFXColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
targetFXCenter: {fileID: 0}
|
||||
targetFXRotationSpeed: 50
|
||||
targetFXInitialScale: 4
|
||||
targetFXEndScale: 1.5
|
||||
targetFXScaleToRenderBounds: 1
|
||||
targetFXAlignToGround: 0
|
||||
targetFXFadePower: 32
|
||||
targetFXGroundMaxDistance: 10
|
||||
targetFXGroundLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
targetFXTransitionDuration: 0.5
|
||||
targetFXStayDuration: 1.5
|
||||
targetFXVisibility: 1
|
||||
seeThrough: 2
|
||||
seeThroughOccluderMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
seeThroughOccluderThreshold: 0.3
|
||||
seeThroughOccluderMaskAccurate: 0
|
||||
seeThroughOccluderCheckInterval: 1
|
||||
seeThroughOccluderCheckIndividualObjects: 0
|
||||
seeThroughDepthOffset: 0
|
||||
seeThroughMaxDepth: 0
|
||||
seeThroughIntensity: 0.8
|
||||
seeThroughTintAlpha: 0.5
|
||||
seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1}
|
||||
seeThroughNoise: 1
|
||||
seeThroughBorder: 0
|
||||
seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
seeThroughBorderOnly: 0
|
||||
seeThroughBorderWidth: 0.45
|
||||
seeThroughOrdered: 0
|
||||
seeThroughTexture: {fileID: 0}
|
||||
seeThroughTextureUVSpace: 0
|
||||
seeThroughTextureScale: 1
|
||||
rmsCount: 1
|
||||
hitFxInitialIntensity: 0
|
||||
hitFxMode: 0
|
||||
hitFxFadeOutDuration: 0.25
|
||||
hitFxColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
hitFxRadius: 0.5
|
||||
--- !u!4 &9011460203944377687
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -6,6 +6,7 @@ public class TB_SubProcess
|
|||
public string subProcessName;
|
||||
public bool isPrecondition;
|
||||
public string precondition;
|
||||
public string toolID;
|
||||
public string tipTitle;
|
||||
public string tips;
|
||||
}
|
|
@ -7,5 +7,6 @@ public class TB_SubProcessStep
|
|||
public string subProcessStepName;
|
||||
public bool isPrecondition;
|
||||
public string precondition;
|
||||
public string tipTitle;
|
||||
public float score;
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
public class TB_ToolAndMaterial
|
||||
{
|
||||
public int id;
|
||||
public int schemeId;
|
||||
public string objName;
|
||||
public int type;
|
||||
public string prefabName;
|
||||
|
|
|
@ -47,7 +47,7 @@ public class DataManager : BaseManager<DataManager>
|
|||
/// </summary>
|
||||
private Dictionary<int, TB_ToolAndMaterial> toolAndMaterialDic = new Dictionary<int, TB_ToolAndMaterial>();
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 初始化
|
||||
|
@ -76,12 +76,12 @@ public class DataManager : BaseManager<DataManager>
|
|||
var allSchemeList = new List<TB_Scheme>();
|
||||
foreach (var item in schemeDic.Values)
|
||||
{
|
||||
if (item.systemId==GameManager.ProcessMgr.id)
|
||||
if (item.systemId == GameManager.Instance.systemId)
|
||||
allSchemeList.Add(item);
|
||||
}
|
||||
return allSchemeList;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取D_Scheme
|
||||
/// </summary>
|
||||
|
@ -96,7 +96,6 @@ public class DataManager : BaseManager<DataManager>
|
|||
d_Scheme.id = schemeDic[id].id;
|
||||
d_Scheme.schemeName = schemeDic[id].schemeName;
|
||||
}
|
||||
|
||||
d_Scheme.processes = GetD_Processes(d_Scheme.id);
|
||||
return d_Scheme;
|
||||
}
|
||||
|
@ -186,6 +185,32 @@ public class DataManager : BaseManager<DataManager>
|
|||
return d_SubProcessSteps;
|
||||
}
|
||||
|
||||
|
||||
public List<int> GetSubProcessStepIDByToolID(int toolID)
|
||||
{
|
||||
List<TB_SubProcess> tb_subProcesss = new List<TB_SubProcess>();
|
||||
List<int> toolIDTemp = new List<int>();
|
||||
foreach (var item in subProcessDic.Values)
|
||||
{
|
||||
if (item.schemeId == GameManager.ProcessMgr.schemeID)
|
||||
tb_subProcesss.Add(item);
|
||||
}
|
||||
foreach (var item in tb_subProcesss)
|
||||
{
|
||||
if (string.IsNullOrEmpty(item.toolID))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
string[] subProcessStepToolID = item.toolID.Split(',');
|
||||
for (int i = 0; i < subProcessStepToolID.Length; i++)
|
||||
{
|
||||
if (int.Parse(subProcessStepToolID[i]) == toolID)
|
||||
toolIDTemp.Add(item.id);
|
||||
}
|
||||
}
|
||||
return toolIDTemp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据系统Id 获取系统信息
|
||||
/// </summary>
|
||||
|
|
|
@ -12,10 +12,6 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 实操项目id
|
||||
/// </summary>
|
||||
public int id = 10002;
|
||||
|
||||
/// <summary>
|
||||
/// 模式
|
||||
|
@ -74,7 +70,7 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
/// <param name="id">方案id</param>
|
||||
public void Init(int id, E_ModeType mode, int countDown = 600) //TODO 考试断线重连应该考虑初始化问题
|
||||
{
|
||||
this.id = id;
|
||||
this.schemeID = id;
|
||||
this.mode = mode;
|
||||
coroutine = GameManager.MonoMgr.StartCoroutine(CountDown(countDown));
|
||||
d_Scheme = DataManager.Instance.GetSchemeData(id);
|
||||
|
@ -115,18 +111,22 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// 切换
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool CheckSubProcessSteps(string subProcessStepName)
|
||||
public bool CheckSubProcessSteps(int subProcessStepID)
|
||||
{
|
||||
if (d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.subProcessStepName.Equals(subProcessStepName))
|
||||
if (d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.id.Equals(subProcessStepID))
|
||||
{
|
||||
int spStepID = subProcessStepId + 1;
|
||||
int spStepcount = d_Scheme.CurrentProcess.CurrentSubProcess.subProcessStepes.Count;
|
||||
if (spStepID <= d_Scheme.CurrentProcess.CurrentSubProcess.subProcessStepes[spStepcount - 1].id)
|
||||
{
|
||||
HandoverSubProcessStep(spStepID);
|
||||
GameManager.UIMgr.ShowPanel<UI_TopTipPanel>(E_UI_Layer.System, (panel) =>
|
||||
{
|
||||
panel.Init($"{d_Scheme.CurrentProcess.processName}:<color=blue>{d_Scheme.CurrentProcess.CurrentSubProcess.subProcessName}</color>", $"{d_Scheme.CurrentProcess.CurrentSubProcess.tips}");
|
||||
});
|
||||
Debug.Log("进入下一步子流程步骤");
|
||||
return true;
|
||||
}
|
||||
|
@ -137,6 +137,10 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
if (spID <= d_Scheme.CurrentProcess.subProcesses[spCount - 1].id)
|
||||
{
|
||||
HandoverSubProcess(spID, 0);
|
||||
GameManager.UIMgr.ShowPanel<UI_TopTipPanel>(E_UI_Layer.System, (panel) =>
|
||||
{
|
||||
panel.Init($"{d_Scheme.CurrentProcess.processName}:<color=blue>{d_Scheme.CurrentProcess.CurrentSubProcess.subProcessName}</color>", $"{d_Scheme.CurrentProcess.CurrentSubProcess.tips}");
|
||||
});
|
||||
Debug.Log("进入下一步子流程");
|
||||
return true;
|
||||
}
|
||||
|
@ -147,6 +151,10 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
if (pID <= d_Scheme.processes[pCount - 1].id)
|
||||
{
|
||||
HandoverProcess(pID, 0, 0);
|
||||
GameManager.UIMgr.ShowPanel<UI_TopTipPanel>(E_UI_Layer.System, (panel) =>
|
||||
{
|
||||
panel.Init($"{d_Scheme.CurrentProcess.processName}:<color=blue>{d_Scheme.CurrentProcess.CurrentSubProcess.subProcessName}</color>", $"{d_Scheme.CurrentProcess.CurrentSubProcess.tips}");
|
||||
});
|
||||
Debug.Log("进入下一步流程");
|
||||
return true;
|
||||
}
|
||||
|
@ -162,6 +170,10 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
else
|
||||
{
|
||||
Debug.Log("按照流程走");
|
||||
GameManager.UIMgr.ShowPanel<UI_TopTipPanel>(E_UI_Layer.System, (panel) =>
|
||||
{
|
||||
panel.Init($"<color=red>错误:</color>:<color=blue>{d_Scheme.CurrentProcess.CurrentSubProcess.subProcessName}</color>", $"{d_Scheme.CurrentProcess.CurrentSubProcess.tips}");
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -190,7 +202,7 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
/// </summary>
|
||||
public void End()
|
||||
{
|
||||
id = -1;
|
||||
schemeID = -1;
|
||||
mode = E_ModeType.None;
|
||||
if (coroutine != null)
|
||||
GameManager.MonoMgr.StopCoroutine(coroutine);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
@ -5,33 +6,75 @@ using UnityEngine;
|
|||
public class Device_Mobile : MonoBehaviour
|
||||
{
|
||||
public int downIndex = 0;
|
||||
public int modelID = 5005;
|
||||
public List<int> subProcessID = new List<int>();
|
||||
private void Awake()
|
||||
{
|
||||
subProcessID = GameManager.DataMgr.GetSubProcessStepIDByToolID(modelID);
|
||||
}
|
||||
private void Start()
|
||||
{
|
||||
GameManager.EventMgr.AddEventListener<int>(Enum_EventType.SwitchSubProcess, SwitchSubProcess);
|
||||
}
|
||||
|
||||
private void SwitchSubProcess(int arg0)
|
||||
{
|
||||
if (subProcessID.Contains(arg0))
|
||||
{
|
||||
Debug.Log("ÎÒÓ¦¸ÃÌáʾ");
|
||||
}
|
||||
}
|
||||
|
||||
private void OnMouseDown()
|
||||
{
|
||||
switch (downIndex)
|
||||
{
|
||||
case 0:
|
||||
if (GameManager.ProcessMgr.CheckSubProcessSteps("查看任务单"))
|
||||
if (GameManager.ProcessMgr.CheckSubProcessSteps(4001))
|
||||
downIndex++;
|
||||
break;
|
||||
case 1:
|
||||
if (GameManager.ProcessMgr.CheckSubProcessSteps("工作预约"))
|
||||
if (GameManager.ProcessMgr.CheckSubProcessSteps(4002))
|
||||
downIndex++;
|
||||
break;
|
||||
case 2:
|
||||
if (GameManager.ProcessMgr.CheckSubProcessSteps("选择正确工作票"))
|
||||
if (GameManager.ProcessMgr.CheckSubProcessSteps(4003))
|
||||
downIndex++;
|
||||
break;
|
||||
case 3:
|
||||
GameManager.ProcessMgr.CheckSubProcessSteps("1212");
|
||||
downIndex = 0;
|
||||
if (GameManager.ProcessMgr.CheckSubProcessSteps(4004))
|
||||
downIndex++;
|
||||
break;
|
||||
case 4:
|
||||
if (GameManager.ProcessMgr.CheckSubProcessSteps(4005))
|
||||
downIndex++;
|
||||
break;
|
||||
case 5:
|
||||
if (GameManager.ProcessMgr.CheckSubProcessSteps(4006))
|
||||
downIndex++;
|
||||
break;
|
||||
case 6:
|
||||
if (GameManager.ProcessMgr.CheckSubProcessSteps(4007))
|
||||
downIndex++;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
if (Input.GetKeyDown("r"))
|
||||
{
|
||||
GameManager.ProcessMgr.CheckSubProcessSteps(2);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnMouseExit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
GameManager.EventMgr.RemoveEventListener<int>(Enum_EventType.SwitchSubProcess, SwitchSubProcess);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using TMPro;
|
||||
|
||||
public class UI_ProcessItem : BasePanel
|
||||
public class UI_ProcessItem : BaseItem
|
||||
{
|
||||
public int processID;
|
||||
public void Init(int processID, string processName)
|
||||
|
|
|
@ -9,6 +9,11 @@ public class UI_SubProcessItem : BaseItem
|
|||
public int processID;
|
||||
public int subProcessID;
|
||||
public int subProcessStepID;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
GameManager.EventMgr.AddEventListener<int>(Enum_EventType.SwitchSubProcess, SwitchSubProcess);
|
||||
}
|
||||
public void Init(D_SubProcess d_SubProcess)
|
||||
{
|
||||
this.processID = d_SubProcess.processId;
|
||||
|
@ -18,14 +23,29 @@ public class UI_SubProcessItem : BaseItem
|
|||
gameObject.name = subProcessID.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ¿ØÖư´Å¥×´Ì¬
|
||||
/// </summary>
|
||||
/// <param name="subProcess"></param>
|
||||
private void SwitchSubProcess(int subProcess)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnClick(string btnName)
|
||||
{
|
||||
base.OnClick(btnName);
|
||||
switch (btnName)
|
||||
{
|
||||
case "subProcessBtn":
|
||||
GameManager.ProcessMgr.HandoverProcess(processID, subProcessID, subProcessStepID);
|
||||
//GameManager.ProcessMgr.HandoverProcess(processID, subProcessID, subProcessStepID);
|
||||
GameManager.EventMgr.EventTrigger<int>(Enum_EventType.SwitchSubProcess, subProcessID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
GameManager.EventMgr.RemoveEventListener<int>(Enum_EventType.SwitchSubProcess, SwitchSubProcess);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public class UI_MainTitlePanel : BasePanel
|
|||
|
||||
private void SwitchTitleImg()
|
||||
{
|
||||
var systemInfo = GameManager.DataMgr.GetSystemInfo(GameManager.ProcessMgr.id);
|
||||
var systemInfo = GameManager.DataMgr.GetSystemInfo(GameManager.Instance.systemId);
|
||||
GetControl<Image>("TopBgImg").sprite =
|
||||
GameManager.ResourcesMgr.Load<Sprite>(Const.UI_MainTitlePanel + systemInfo.titleName);
|
||||
}
|
||||
|
|
|
@ -72,6 +72,7 @@ public class UI_SelectDevicePanel : BasePanel
|
|||
deviceBtnAComponent.onClick.AddListener(() =>
|
||||
{
|
||||
GameManager.RunModelMgr.deviceId = int.Parse(deviceBtnAComponent.name);
|
||||
GameManager.ProcessMgr.Init(GameManager.RunModelMgr.deviceId, E_ModeType.Study);
|
||||
GameManager.UIMgr.ShowPanel<UI_LoadingPanel>(E_UI_Layer.System, (panel) =>
|
||||
{
|
||||
GameManager.UIMgr.ShowPanel<UI_MainTitlePanel>(E_UI_Layer.Bot, (panel) =>
|
||||
|
|
|
@ -18,8 +18,6 @@ public class UI_TaskListPanel : BasePanel
|
|||
GameManager.ResourcesMgr.LoadAsync<UI_SubProcessItem>($"{Const.UI_Item}UI_TaskListPanel/subProcessItem", (stemp) =>
|
||||
{
|
||||
_subProcessItem = stemp;
|
||||
|
||||
GameManager.ProcessMgr.Init(schemeID, E_ModeType.Study);
|
||||
D_Scheme d_Scheme = GameManager.ProcessMgr.d_Scheme;
|
||||
for (int i = 0; i < d_Scheme.processes.Count; i++)
|
||||
{
|
||||
|
@ -28,7 +26,7 @@ public class UI_TaskListPanel : BasePanel
|
|||
for (int j = 0; j < d_Scheme.processes[i].subProcesses.Count; j++)
|
||||
{
|
||||
var s = Instantiate(_subProcessItem, _content);
|
||||
s.Init( d_Scheme.processes[i].subProcesses[j]);
|
||||
s.Init(d_Scheme.processes[i].subProcesses[j]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,4 +27,9 @@ public enum Enum_EventType
|
|||
/// 切换场景
|
||||
/// </summary>
|
||||
SwitchScene,
|
||||
|
||||
/// <summary>
|
||||
/// 切换子流程
|
||||
/// </summary>
|
||||
SwitchSubProcess,
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ using UnityEngine.UI;
|
|||
public class BasePanel : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// ??????????п??
|
||||
/// ??????????§α??
|
||||
/// </summary>
|
||||
private readonly Dictionary<string,List<UIBehaviour>> controlDic = new Dictionary<string, List<UIBehaviour>>();
|
||||
|
||||
|
|
|
@ -36,9 +36,8 @@ public class OfficeTimelineControl : MonoBehaviour
|
|||
GameManager.UIMgr.ShowPanel<UI_MaskPanel>(E_UI_Layer.System, (panel) =>
|
||||
{
|
||||
panel.Init();
|
||||
GameManager.EventMgr.EventTrigger(Enum_EventType.HideMask);
|
||||
Invoke("DestroyPlayer", 1f);
|
||||
});
|
||||
Invoke(nameof(DestroyPlayer), 1f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,6 +54,7 @@ public class OfficeTimelineControl : MonoBehaviour
|
|||
{
|
||||
panel.Init();
|
||||
GameManager.EventMgr.EventTrigger(Enum_EventType.SwitchScene, GameManager.RunModelMgr.SceneType);
|
||||
GameManager.EventMgr.EventTrigger(Enum_EventType.HideMask);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue