改步骤重置
This commit is contained in:
parent
9dc763d14c
commit
719b1899a2
|
@ -45,6 +45,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u5DE5\u4F5C\u9884\u7EA6"
|
||||
initSceneType: 1
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -94,6 +95,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u62C6\u9664\u7535\u80FD\u8BA1\u91CF\u88C5\u7F6E"
|
||||
initSceneType: 3
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -250,6 +252,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u9009\u53D6\u5DE5\u5668\u5177"
|
||||
initSceneType: 2
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -344,6 +347,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u5B89\u88C5\u7535\u80FD\u8868"
|
||||
initSceneType: 3
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -393,6 +397,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u73B0\u573A\u901A\u7535\u53CA\u68C0\u67E5"
|
||||
initSceneType: 3
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -487,6 +492,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u529E\u7406\u5DE5\u4F5C\u7968"
|
||||
initSceneType: 1
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -536,6 +542,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u5B89\u88C5\u68C0\u67E5"
|
||||
initSceneType: 3
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -585,6 +592,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u5B9E\u65BD\u5C01\u5370"
|
||||
initSceneType: 3
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -634,6 +642,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u63A5\u7EBF\u68C0\u67E5"
|
||||
initSceneType: 3
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -728,6 +737,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u6B63\u786E\u7740\u88C5"
|
||||
initSceneType: 2
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -916,6 +926,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u73ED\u524D\u4F1A"
|
||||
initSceneType: 3
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -965,6 +976,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u65AD\u5F00\u7535\u6E90\u5E76\u9A8C\u7535"
|
||||
initSceneType: 3
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -1014,6 +1026,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u6E05\u7406\u73B0\u573A"
|
||||
initSceneType: 3
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -1063,6 +1076,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u586B\u5199\u544A\u77E5\u5355"
|
||||
initSceneType: 3
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -1112,6 +1126,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u586B\u5199\u88C5\u62C6\u5DE5\u5355"
|
||||
initSceneType: 1
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -1161,6 +1176,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u4E0E\u5BA2\u6237\u6C9F\u901A"
|
||||
initSceneType: 3
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -1212,6 +1228,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u67E5\u770B\u4EFB\u52A1\u5355"
|
||||
initSceneType: 1
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
@ -1273,6 +1290,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: b60c6991d2888da47850978d1051aa7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
"\u81EA\u5B9A\u4E49": "\u6838\u5BF9\u548C\u6284\u5F55\u8BA1\u91CF\u8BBE\u5907\u4FE1\u606F"
|
||||
initSceneType: 3
|
||||
systemId: 0
|
||||
schemeId: 0
|
||||
|
|
|
@ -4981,6 +4981,63 @@ Transform:
|
|||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &2135879011
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1817104531314915914, guid: 049bfb1489c99ca49bfbcdcdca9d9cbf, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1817104531314915914, guid: 049bfb1489c99ca49bfbcdcdca9d9cbf, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1817104531314915914, guid: 049bfb1489c99ca49bfbcdcdca9d9cbf, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 1.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1817104531314915914, guid: 049bfb1489c99ca49bfbcdcdca9d9cbf, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1817104531314915914, guid: 049bfb1489c99ca49bfbcdcdca9d9cbf, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1817104531314915914, guid: 049bfb1489c99ca49bfbcdcdca9d9cbf, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1817104531314915914, guid: 049bfb1489c99ca49bfbcdcdca9d9cbf, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1817104531314915914, guid: 049bfb1489c99ca49bfbcdcdca9d9cbf, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1817104531314915914, guid: 049bfb1489c99ca49bfbcdcdca9d9cbf, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1817104531314915914, guid: 049bfb1489c99ca49bfbcdcdca9d9cbf, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1817104531314915914, guid: 049bfb1489c99ca49bfbcdcdca9d9cbf, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1817104531314915916, guid: 049bfb1489c99ca49bfbcdcdca9d9cbf, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: "\u6B65\u9AA4\u72B6\u6001"
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 049bfb1489c99ca49bfbcdcdca9d9cbf, type: 3}
|
||||
--- !u!33 &26734964485665869
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using Unity.VisualScripting.Antlr3.Runtime;
|
||||
using UnityEngine;
|
||||
using static UnityEngine.EventSystems.EventTrigger;
|
||||
|
||||
/// <summary>
|
||||
/// ¼ÆÁ¿¹ñ
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ef43d36c714b9ad44bf358e51f661beb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,134 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Unity.VisualScripting.Antlr3.Runtime.Misc;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 直接接入式电能计量装置 步骤状态设置
|
||||
/// </summary>
|
||||
public class StepState_1002 : StepState
|
||||
{
|
||||
private void Awake()
|
||||
{
|
||||
steps.Add(1, E_SceneType.Office);
|
||||
steps.Add(2, E_SceneType.Office);
|
||||
steps.Add(3, E_SceneType.Office);
|
||||
steps.Add(4, E_SceneType.Office);
|
||||
steps.Add(5, E_SceneType.ToolRoom);
|
||||
steps.Add(6, E_SceneType.ToolRoom);
|
||||
steps.Add(7, E_SceneType.Site);
|
||||
steps.Add(8, E_SceneType.Site);
|
||||
steps.Add(9, E_SceneType.Site);
|
||||
steps.Add(10, E_SceneType.Site);
|
||||
steps.Add(11, E_SceneType.Site);
|
||||
steps.Add(12, E_SceneType.Site);
|
||||
steps.Add(13, E_SceneType.Site);
|
||||
steps.Add(14, E_SceneType.Site);
|
||||
steps.Add(15, E_SceneType.Site);
|
||||
steps.Add(16, E_SceneType.Site);
|
||||
steps.Add(17, E_SceneType.Site);
|
||||
steps.Add(18, E_SceneType.Site);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 跳步骤
|
||||
/// </summary>
|
||||
/// <param name="num">从一开始</param>
|
||||
public void JumpStep(int num)
|
||||
{
|
||||
num--;
|
||||
//检查是否跳场景
|
||||
InvokeChangeScene(steps[num], isChangeSence =>
|
||||
{
|
||||
//找到此步骤场景第一个
|
||||
int first = steps.First(a => a.Value == steps[num]).Key;
|
||||
|
||||
//从场景第一个开始还原到此步骤
|
||||
while (first>steps.Count-1 && first>num)
|
||||
{
|
||||
SetStepState(first);
|
||||
first++;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void SetStepState(int num)
|
||||
{
|
||||
Debug.Log("切换步骤"+num);
|
||||
if (num == 1)
|
||||
{
|
||||
//查看任务单
|
||||
OfficeManager.Instance.mobileController.downIndex = 0;
|
||||
}
|
||||
else if (num == 2)
|
||||
{
|
||||
//工作预约
|
||||
OfficeManager.Instance.mobileController.downIndex = 1;
|
||||
}
|
||||
else if (num == 3)
|
||||
{
|
||||
//办理工作票
|
||||
}
|
||||
else if (num == 4)
|
||||
{
|
||||
//填写装拆工单
|
||||
}
|
||||
else if (num == 5)
|
||||
{
|
||||
//正确着装
|
||||
}
|
||||
else if (num == 6)
|
||||
{
|
||||
//选取工器具
|
||||
}
|
||||
else if (num == 7)
|
||||
{
|
||||
//与客户沟通
|
||||
}
|
||||
else if (num == 8)
|
||||
{
|
||||
//班前会
|
||||
}
|
||||
else if (num == 9)
|
||||
{
|
||||
//接线检查
|
||||
}
|
||||
else if(num == 10)
|
||||
{
|
||||
//断开电源并验电
|
||||
}
|
||||
else if (num == 11)
|
||||
{
|
||||
//核对和抄录计量设备信息
|
||||
}
|
||||
else if(num==12)
|
||||
{
|
||||
//拆除电能计量装置
|
||||
}
|
||||
else if( num == 13)
|
||||
{
|
||||
//安装电能表
|
||||
}
|
||||
else if (num == 14)
|
||||
{
|
||||
//安装检查
|
||||
}
|
||||
else if(num==15)
|
||||
{
|
||||
//现场通电及检查
|
||||
}
|
||||
else if(num==16)
|
||||
{
|
||||
//实施封印
|
||||
}
|
||||
else if(num==17)
|
||||
{
|
||||
//填写告知单
|
||||
}
|
||||
else if(num==18)
|
||||
{
|
||||
//清理现场
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6188c45bfdd84a54990578cb8f87397c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -9,11 +9,6 @@ using UnityEngine;
|
|||
/// </summary>
|
||||
public class StepState : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// 步骤所处场景
|
||||
/// </summary>
|
||||
public E_SceneType initSceneType;
|
||||
|
||||
[HideInInspector]
|
||||
public int systemId;
|
||||
[HideInInspector]
|
||||
|
@ -21,35 +16,25 @@ public class StepState : MonoBehaviour
|
|||
[HideInInspector]
|
||||
public int subProcessId;
|
||||
|
||||
public List<StepStateBase> stepStateBases;
|
||||
private Action<E_SceneType> callback;
|
||||
|
||||
public Dictionary<int,E_SceneType> steps;
|
||||
|
||||
public void Init()
|
||||
{
|
||||
stepStateBases = transform.GetComponentsInChildren<StepStateBase>(true).ToList();
|
||||
subProcessId = int.Parse(gameObject.name);
|
||||
schemeId = int.Parse(transform.parent.name);
|
||||
systemId = int.Parse(transform.parent.parent.name);
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 注册场景跳转回调
|
||||
///// </summary>
|
||||
///// <param name="callback"></param>
|
||||
//public void AddResetChangeScene(Action<E_SceneType> callback)
|
||||
//{
|
||||
// this.callback = callback;
|
||||
//}
|
||||
|
||||
public void InvokeChangeScene()
|
||||
/// <summary>
|
||||
/// 跳场景并且执行场景状态设置
|
||||
/// </summary>
|
||||
/// <param name="jumpSence"></param>
|
||||
/// <param name="doStepState"></param>
|
||||
public void InvokeChangeScene(E_SceneType jumpSence, Action<bool> doStepState)
|
||||
{
|
||||
//if (callback != null)
|
||||
//{
|
||||
// callback(initSceneType);
|
||||
//};
|
||||
|
||||
string sname = "";
|
||||
switch (initSceneType)
|
||||
switch (jumpSence)
|
||||
{
|
||||
case E_SceneType.None:
|
||||
return;
|
||||
|
@ -65,17 +50,25 @@ public class StepState : MonoBehaviour
|
|||
default:
|
||||
return;
|
||||
}
|
||||
if (GameManager.RunModelMgr.SceneType != initSceneType)
|
||||
if (GameManager.RunModelMgr.SceneType != jumpSence)
|
||||
{
|
||||
//跳场景
|
||||
GameManager.UIMgr.ShowPanel<UI_LoadingPanel>(E_UI_Layer.System);
|
||||
GameManager.ScenesMgr.LoadSceneAsyn(sname, () =>
|
||||
{
|
||||
Debug.Log("步骤场景:" + initSceneType.ToString());
|
||||
Debug.Log("步骤场景:" + jumpSence.ToString());
|
||||
GameManager.UIMgr.HidePanel<UI_LoadingPanel>();
|
||||
GameManager.RunModelMgr.SceneType = initSceneType;
|
||||
GameManager.EventMgr.EventTrigger(Enum_EventType.SwitchScene, initSceneType);
|
||||
GameManager.RunModelMgr.SceneType = jumpSence;
|
||||
GameManager.EventMgr.EventTrigger(Enum_EventType.SwitchScene, jumpSence);
|
||||
GameManager.EventMgr.EventTrigger<int>(Enum_EventType.SwitchSubProcessStepTriggerID, GameManager.ProcessMgr.d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.triggersId[0]);
|
||||
|
||||
doStepState.Invoke(true);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
doStepState.Invoke(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,11 +54,11 @@ public class StepStateControl : MonoBehaviour
|
|||
{
|
||||
ss.ForEach(a=>
|
||||
{
|
||||
StepStateBase sb = a.stepStateBases.Find(a => a.gameObject.name == objName);
|
||||
if (sb != null)
|
||||
{
|
||||
sb.AddResetFunction(callback);
|
||||
}
|
||||
//StepStateBase sb = a.stepStateBases.Find(a => a.gameObject.name == objName);
|
||||
//if (sb != null)
|
||||
//{
|
||||
// sb.AddResetFunction(callback);
|
||||
//}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -76,12 +76,12 @@ public class StepStateControl : MonoBehaviour
|
|||
{
|
||||
Debug.Log("³õʼ»¯²½Öè");
|
||||
//Ìø³¡¾°
|
||||
tmp.InvokeChangeScene();
|
||||
//tmp.InvokeChangeScene();
|
||||
//³õʼ»¯base
|
||||
tmp.stepStateBases.ForEach(a =>
|
||||
{
|
||||
a.InvokeInitStepStae();
|
||||
});
|
||||
//tmp.stepStateBases.ForEach(a =>
|
||||
//{
|
||||
// a.InvokeInitStepStae();
|
||||
//});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,13 +6,17 @@ using UnityEngine;
|
|||
/// <summary>
|
||||
/// create by adam
|
||||
/// </summary>
|
||||
public class OfficeManager : MonoBehaviour
|
||||
public class OfficeManager : SingletonMono<OfficeManager>
|
||||
{
|
||||
public int currentProcessID;
|
||||
public int currentSubProcessID;
|
||||
public int currentSubProcessStepID;
|
||||
public int currentSubProcessStepTriggerID;
|
||||
// Start is called before the first frame update
|
||||
|
||||
/// <summary>
|
||||
/// 手机
|
||||
/// </summary>
|
||||
public MobileController mobileController;
|
||||
void Start()
|
||||
{
|
||||
GameManager.EventMgr.AddEventListener(Enum_EventType.OfficeTimeLineOver, OfficeTimeLineOver);
|
||||
|
|
Loading…
Reference in New Issue