修改提示问题,修改收回工具逻辑,修改继承重载问题,修改流程triggerID实时更新的问题
This commit is contained in:
parent
60acc714d6
commit
f796755ef4
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -5156,6 +5156,7 @@ MonoBehaviour:
|
|||
currentTool: {fileID: 0}
|
||||
spawnToolPos: {fileID: 1927580343}
|
||||
tMDTips: {fileID: 1180096483}
|
||||
triggerName: "\u6536\u56DE\u5DE5\u5177"
|
||||
--- !u!4 &2109812127
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -12,14 +12,21 @@ public class Device_Base : PermanentTriggerBase
|
|||
/// <summary>
|
||||
/// trigger´¥·¢Ê¼þ
|
||||
/// </summary>
|
||||
public Func<string,bool,int> triggerAction;
|
||||
public Func<string, bool, int> triggerAction;
|
||||
|
||||
private Vector3 head_LocalPos;
|
||||
private Vector3 head_LocalEulerAnglesl;
|
||||
|
||||
protected override void OnAwake()
|
||||
{
|
||||
if (GameManager.RunModelMgr.SceneType == E_SceneType.Site)
|
||||
{
|
||||
base.OnAwake();
|
||||
}
|
||||
}
|
||||
protected override void OnStart()
|
||||
{
|
||||
if ( GameManager.RunModelMgr.SceneType == E_SceneType.Site)
|
||||
if (GameManager.RunModelMgr.SceneType == E_SceneType.Site)
|
||||
{
|
||||
base.OnStart();
|
||||
AddTriggerAction(GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID);
|
||||
|
@ -28,7 +35,7 @@ public class Device_Base : PermanentTriggerBase
|
|||
|
||||
protected override void OnMEnter()
|
||||
{
|
||||
if ( GameManager.RunModelMgr.SceneType == E_SceneType.Site && GameManager.RunModelMgr.ModeType != E_ModeType.Study)
|
||||
if (GameManager.RunModelMgr.SceneType == E_SceneType.Site && GameManager.RunModelMgr.ModeType != E_ModeType.Study)
|
||||
{
|
||||
base.OnMEnter();
|
||||
_highlight.SetHighlighted(true);
|
||||
|
|
|
@ -28,8 +28,9 @@ public class Device_Cover : Device_Base
|
|||
[Tooltip("ÓÒ¸Ç×Ó·âÓ¡")]
|
||||
public Device_Seal cover_seal_Right;
|
||||
|
||||
private void OnMouseDown()
|
||||
protected override void OnMDown()
|
||||
{
|
||||
base.OnMDown();
|
||||
if ((triggerAction == null ? 0 : triggerAction.Invoke(triggerName, false)) == 0)
|
||||
{
|
||||
isCheckOK = true;
|
||||
|
@ -59,12 +60,12 @@ public class Device_Cover : Device_Base
|
|||
Transform parent = cover_screw_Left.transform.parent;
|
||||
cover_screw_Left.transform.parent = transform;
|
||||
cover_screw_Right.transform.parent = transform;
|
||||
transform.DOLocalMove(new Vector3(transform.localPosition.x,-0.1388763f, -0.2485413f), 2).OnComplete(() =>
|
||||
{
|
||||
cover_screw_Left.transform.parent = parent;
|
||||
cover_screw_Right.transform.parent = parent;
|
||||
int result = (triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true));
|
||||
});
|
||||
transform.DOLocalMove(new Vector3(transform.localPosition.x, -0.1388763f, -0.2485413f), 2).OnComplete(() =>
|
||||
{
|
||||
cover_screw_Left.transform.parent = parent;
|
||||
cover_screw_Right.transform.parent = parent;
|
||||
int result = (triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true));
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -78,11 +79,11 @@ public class Device_Cover : Device_Base
|
|||
Transform parent = cover_screw_Left.transform.parent;
|
||||
cover_screw_Left.transform.parent = transform;
|
||||
cover_screw_Right.transform.parent = transform;
|
||||
transform.DOLocalMove(new Vector3(transform.localPosition.x,0.01112366f, -0.09854126f), 2).OnComplete(() =>
|
||||
{
|
||||
cover_screw_Left.transform.parent = parent;
|
||||
cover_screw_Right.transform.parent = parent;
|
||||
int result = (triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true));
|
||||
});
|
||||
transform.DOLocalMove(new Vector3(transform.localPosition.x, 0.01112366f, -0.09854126f), 2).OnComplete(() =>
|
||||
{
|
||||
cover_screw_Left.transform.parent = parent;
|
||||
cover_screw_Right.transform.parent = parent;
|
||||
int result = (triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,8 +21,9 @@ public class Device_Switch : Device_Base
|
|||
this.actionBack = actionBack;
|
||||
}
|
||||
|
||||
private void OnMouseDown()
|
||||
protected override void OnMDown()
|
||||
{
|
||||
base.OnMDown();
|
||||
if ((triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true)) == 0)
|
||||
{
|
||||
if (isOpen)
|
||||
|
|
|
@ -4,8 +4,9 @@ using UnityEngine;
|
|||
|
||||
public class Device_Sundries : Device_Base
|
||||
{
|
||||
private void OnMouseDown()
|
||||
protected override void OnMDown()
|
||||
{
|
||||
base.OnMDown();
|
||||
Debug.Log("清理柜子杂物");
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ public abstract class StepState : MonoBehaviour
|
|||
GameManager.UIMgr.HidePanel<UI_LoadingPanel>();
|
||||
GameManager.RunModelMgr.SceneType = jumpSence;
|
||||
GameManager.EventMgr.EventTrigger(Enum_EventType.SwitchScene, jumpSence);
|
||||
GameManager.EventMgr.EventTrigger<string>(Enum_EventType.SwitchSubProcessStepTriggerID, ProcessManager.Instance.subProcessStepTriggerID);
|
||||
//GameManager.EventMgr.EventTrigger<string>(Enum_EventType.SwitchSubProcessStepTriggerID, ProcessManager.Instance.subProcessStepTriggerID);
|
||||
|
||||
doStepState.Invoke(true);
|
||||
});
|
||||
|
|
|
@ -23,9 +23,16 @@ public class Tool_Base : PermanentTriggerBase
|
|||
private Vector3 head_LocalPos;
|
||||
private Vector3 head_LocalEulerAnglesl;
|
||||
|
||||
protected override void OnAwake()
|
||||
{
|
||||
if (GameManager.RunModelMgr.SceneType == E_SceneType.Site)
|
||||
{
|
||||
base.OnAwake();
|
||||
}
|
||||
}
|
||||
protected override void OnStart()
|
||||
{
|
||||
if ( GameManager.RunModelMgr.SceneType == E_SceneType.Site)
|
||||
if (GameManager.RunModelMgr.SceneType == E_SceneType.Site)
|
||||
{
|
||||
base.OnStart();
|
||||
AddTriggerAction(GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID);
|
||||
|
@ -59,10 +66,10 @@ public class Tool_Base : PermanentTriggerBase
|
|||
/// </summary>
|
||||
/// <param name="head_LocalPos"></param>
|
||||
/// <param name="head_LocalEulerAnglesl"></param>
|
||||
public void SetHeadPosAndEulerang(Vector3 head_LocalPos,Vector3 head_LocalEulerAnglesl)
|
||||
public void SetHeadPosAndEulerang(Vector3 head_LocalPos, Vector3 head_LocalEulerAnglesl)
|
||||
{
|
||||
this.head_LocalPos = head_LocalPos;
|
||||
this.head_LocalEulerAnglesl= head_LocalEulerAnglesl;
|
||||
this.head_LocalEulerAnglesl = head_LocalEulerAnglesl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -70,7 +77,7 @@ public class Tool_Base : PermanentTriggerBase
|
|||
/// </summary>
|
||||
public void ReBackHead()
|
||||
{
|
||||
transform.parent=Camera.main.transform;
|
||||
transform.parent = Camera.main.transform;
|
||||
transform.DOLocalRotate(head_LocalEulerAnglesl, 0.5f);
|
||||
transform.DOLocalMove(head_LocalPos, 1).OnComplete(() =>
|
||||
{
|
||||
|
|
|
@ -32,11 +32,11 @@ public class Tool_Line: Tool_Base
|
|||
|
||||
private Action<bool> actionBack;
|
||||
|
||||
protected override void OnAwake()
|
||||
{
|
||||
base.OnAwake();
|
||||
id = gameObject.name;
|
||||
}
|
||||
//protected override void OnAwake()
|
||||
//{
|
||||
// base.OnAwake();
|
||||
// id = gameObject.name;
|
||||
//}
|
||||
|
||||
public void AddAction(Action<bool> actionBack)
|
||||
{
|
||||
|
|
|
@ -44,11 +44,11 @@ public class Tool_Screw : Tool_Base
|
|||
private Action<bool> installAction;
|
||||
|
||||
|
||||
protected override void OnAwake()
|
||||
{
|
||||
base.OnAwake();
|
||||
id = gameObject.name;
|
||||
}
|
||||
//protected override void OnAwake()
|
||||
//{
|
||||
// base.OnAwake();
|
||||
// id = gameObject.name;
|
||||
//}
|
||||
|
||||
public void AddAction(Action<bool> action)
|
||||
{
|
||||
|
|
|
@ -52,6 +52,7 @@ public class Tool_WireStripper : Tool_Base
|
|||
//¼ô¶Ï
|
||||
device_Seal.Cut();
|
||||
isCuning = false;
|
||||
//int result = (triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true));
|
||||
ReBackHead();
|
||||
}
|
||||
|
||||
|
@ -67,7 +68,7 @@ public class Tool_WireStripper : Tool_Base
|
|||
Device_Seal ds = hit.transform.GetComponent<Device_Seal>();
|
||||
if (ds != null)
|
||||
{
|
||||
if ((triggerAction == null ? 0 : triggerAction.Invoke(ds.triggerName, true)) == 0)
|
||||
if ((triggerAction == null ? 0 : triggerAction.Invoke(ds.triggerName, true))== 0)
|
||||
{
|
||||
CutOpen(ds);
|
||||
}
|
||||
|
|
|
@ -109,6 +109,7 @@ public class D_SubProcess : I_Enter, I_Exit
|
|||
CurrentSubProcessStep = GetSubProcessStep(stepId);
|
||||
CurrentSubProcessStep.Enter();
|
||||
UnityEngine.Debug.Log("切换子流程步骤到:" + stepId);
|
||||
UnityEngine.Debug.Log("切换子流程步骤TriggerID到:" + ProcessManager.Instance.subProcessStepTriggerID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -23,7 +23,7 @@ public class D_SubProcessStep : I_Enter, I_Exit
|
|||
public void Init()
|
||||
{
|
||||
GetTriggerID();
|
||||
ProcessManager.Instance.subProcessStepTriggerID = triggersName[0];
|
||||
//ProcessManager.Instance.subProcessStepTriggerID = triggersName[0];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -45,6 +45,7 @@ public class D_SubProcessStep : I_Enter, I_Exit
|
|||
{
|
||||
triggersName.Add(triggerID.Replace("\r\n", "").Replace("\n", "").Replace("\r", ""));
|
||||
}
|
||||
ProcessManager.Instance.subProcessStepTriggerID = triggersName[0];
|
||||
}
|
||||
|
||||
public string SceneName()
|
||||
|
|
|
@ -10,6 +10,7 @@ public class LiveSceneManager : SingletonMono<LiveSceneManager>
|
|||
public GameObject currentTool;
|
||||
public Transform spawnToolPos;
|
||||
public Transform tMDTips;
|
||||
public string triggerName;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
|
@ -41,11 +42,13 @@ public class LiveSceneManager : SingletonMono<LiveSceneManager>
|
|||
});
|
||||
tMDTips.gameObject.SetActive(false);
|
||||
currentTool.transform.localEulerAngles = new Vector3(90, 0, 0);
|
||||
currentTool = null;
|
||||
}
|
||||
if (currentTool.name.Equals("ÈýÏàËÄÏßµçÄܱí"))
|
||||
{
|
||||
tMDTips.gameObject.SetActive(false);
|
||||
currentTool.transform.localEulerAngles = new Vector3(-90, 0, -180);
|
||||
currentTool = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,9 +56,15 @@ public class LiveSceneManager : SingletonMono<LiveSceneManager>
|
|||
{
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
Debug.Log("Escape");
|
||||
tMDTips.gameObject.SetActive(false);
|
||||
Destroy(currentTool);
|
||||
if (currentTool != null)
|
||||
{
|
||||
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, true) == 0)
|
||||
{
|
||||
Debug.Log("Escape");
|
||||
tMDTips.gameObject.SetActive(false);
|
||||
Destroy(currentTool);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,10 +20,13 @@ public class OfficeManager : SingletonMono<OfficeManager>
|
|||
public MobileController mobileController;
|
||||
void Start()
|
||||
{
|
||||
|
||||
GameManager.EventMgr.AddEventListener(Enum_EventType.OfficeTimeLineOver, OfficeTimeLineOver);
|
||||
GameManager.EventMgr.AddEventListener(Enum_EventType.InitializationUI, InitializationUI);
|
||||
GameManager.EventMgr.AddEventListener<int>(Enum_EventType.SwitchSubProcess, SwitchSubProcess);
|
||||
|
||||
if (GameManager.RunModelMgr.ModeType == E_ModeType.Study)
|
||||
{
|
||||
GameManager.EventMgr.AddEventListener<int>(Enum_EventType.SwitchSubProcess, SwitchSubProcess);
|
||||
}
|
||||
}
|
||||
|
||||
private void SwitchSubProcess(int subProcess)
|
||||
|
@ -44,11 +47,14 @@ public class OfficeManager : SingletonMono<OfficeManager>
|
|||
|
||||
private void OfficeTimeLineOver()
|
||||
{
|
||||
GameManager.UIMgr.ShowPanel<UI_MaskPanel>(E_UI_Layer.System, (panel) =>
|
||||
if (!GameManager.UIMgr.GetPanel<UI_MaskPanel>())
|
||||
{
|
||||
panel.Init();
|
||||
GameManager.EventMgr.EventTrigger(Enum_EventType.HideMask);
|
||||
});
|
||||
GameManager.UIMgr.ShowPanel<UI_MaskPanel>(E_UI_Layer.System, (panel) =>
|
||||
{
|
||||
panel.Init();
|
||||
GameManager.EventMgr.EventTrigger(Enum_EventType.HideMask);
|
||||
});
|
||||
}
|
||||
}
|
||||
private void InitializationUI()
|
||||
{
|
||||
|
@ -58,6 +64,8 @@ public class OfficeManager : SingletonMono<OfficeManager>
|
|||
{
|
||||
panel.Init(GameManager.ProcessMgr.subProcessId);
|
||||
});
|
||||
GameManager.EventMgr.EventTrigger<string>(Enum_EventType.SwitchSubProcessStepTriggerID, ProcessManager.Instance.subProcessStepTriggerID);
|
||||
GameManager.EventMgr.EventTrigger(Enum_EventType.SwitchSubProcess, GameManager.ProcessMgr.subProcessId);
|
||||
}
|
||||
|
||||
GameManager.UIMgr.ShowPanel<UI_MenuBar>(E_UI_Layer.Mid, (panel) =>
|
||||
|
@ -65,8 +73,6 @@ public class OfficeManager : SingletonMono<OfficeManager>
|
|||
panel.Init();
|
||||
GameManager.EventMgr.EventTrigger(Enum_EventType.SwitchScene, GameManager.RunModelMgr.SceneType);
|
||||
});
|
||||
GameManager.EventMgr.EventTrigger<string>(Enum_EventType.SwitchSubProcessStepTriggerID, ProcessManager.Instance.subProcessStepTriggerID);
|
||||
GameManager.EventMgr.EventTrigger(Enum_EventType.SwitchSubProcess, GameManager.ProcessMgr.subProcessId);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -179,6 +179,7 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
/// <returns></returns>
|
||||
public int IsRightSubProcessStepsTriggerID(string triggerID, bool isRemove)
|
||||
{
|
||||
if (GameManager.RunModelMgr.ModeType != E_ModeType.Study) return 0;
|
||||
if (d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.precondition == GameManager.RunModelMgr.SceneType.ToString())
|
||||
{
|
||||
if (d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.triggersName.Count > 0)
|
||||
|
@ -190,7 +191,7 @@ public class ProcessManager : BaseManager<ProcessManager>
|
|||
d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.triggersName.RemoveAt(0);
|
||||
if (d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.triggersName.Count == 0)
|
||||
{
|
||||
CheckSubProcessSteps(GameManager.ProcessMgr.subProcessStepId);
|
||||
CheckSubProcessSteps(subProcessStepId);
|
||||
}
|
||||
if (d_Scheme.CurrentProcess.CurrentSubProcess.CurrentSubProcessStep.triggersName.Count != 0)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,6 @@ public class PermanentTriggerBase : MonoBehaviour
|
|||
}
|
||||
private void SwitchSubProcessStepTriggerID(string arg0)
|
||||
{
|
||||
if (_highlight == null) return;
|
||||
if (triggerName == arg0)
|
||||
{
|
||||
_highlight.SetHighlighted(true);
|
||||
|
|
|
@ -52,6 +52,7 @@ public class UI_SubProcessItem : BaseItem
|
|||
//ÖØÖÃÎïÌå
|
||||
StepStateControl.instance.InvokeInitStepState(GameManager.Instance.systemId, GameManager.ProcessMgr.d_Scheme.id, subProcessID);
|
||||
GameManager.EventMgr.EventTrigger<int>(Enum_EventType.SwitchSubProcess, subProcessID);
|
||||
Debug.LogError(ProcessManager.Instance.subProcessStepTriggerID);
|
||||
GameManager.EventMgr.EventTrigger<string>(Enum_EventType.SwitchSubProcessStepTriggerID, ProcessManager.Instance.subProcessStepTriggerID);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,11 @@ public class UI_LowTensionWorkTicketPanel : BasePanel
|
|||
{
|
||||
base.ShowMe();
|
||||
if (GameManager.RunModelMgr.ModeType == E_ModeType.Study)
|
||||
{
|
||||
GetControl<Button>("closeBtn").interactable = false;
|
||||
GetControl<Button>("BackBtn").gameObject.SetActive(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -57,32 +57,27 @@ public class UI_MenuBar : BasePanel
|
|||
if (triggerID == workOrderName)
|
||||
{
|
||||
GameManager.UIMgr.imageTips.ShowTips(workOrderBtn.GetComponent<RectTransform>());
|
||||
Debug.Log("묏鱗데瓊刻");
|
||||
|
||||
}
|
||||
else if (triggerID == disassemblyAssemblyWorkOrderName)
|
||||
{
|
||||
GameManager.UIMgr.imageTips.ShowTips(disassemblyAssemblyWorkOrderBtn.GetComponent<RectTransform>());
|
||||
Debug.Log("뀔陋묏데瓊刻");
|
||||
}
|
||||
else if (triggerID == toolKitName)
|
||||
{
|
||||
GameManager.UIMgr.imageTips.ShowTips(toolKitBtn.GetComponent<RectTransform>());
|
||||
Debug.Log("교관객큐瓊刻");
|
||||
}
|
||||
else if (triggerID == siteName)
|
||||
{
|
||||
GameManager.UIMgr.imageTips.ShowTips(siteBtn.GetComponent<RectTransform>());
|
||||
Debug.Log("君끝객큐瓊刻");
|
||||
}
|
||||
else if (triggerID == officeName)
|
||||
{
|
||||
GameManager.UIMgr.imageTips.ShowTips(officeBtn.GetComponent<RectTransform>());
|
||||
Debug.Log("곗무杆객큐瓊刻");
|
||||
}
|
||||
else if (triggerID == toolRoomName)
|
||||
{
|
||||
GameManager.UIMgr.imageTips.ShowTips(toolRoomBtn.GetComponent<RectTransform>());
|
||||
Debug.Log("묏야쇌객큐瓊刻");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Responser : MonoBehaviour
|
||||
{
|
||||
|
||||
void Start()
|
||||
{
|
||||
GameManager.EventMgr.AddEventListener<string>(Enum_EventType.SwitchSubProcessStepTriggerID, SwitchSubProcessStepTriggerID);
|
||||
}
|
||||
|
||||
private void SwitchSubProcessStepTriggerID(string arg0)
|
||||
{
|
||||
Debug.Log($"MenuClick ===== {arg0}");
|
||||
}
|
||||
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5acc47c41ca61b344ba11e38989c2ac8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,21 +0,0 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 终端设备手机
|
||||
/// </summary>
|
||||
public class TerminalEquipment : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4b802178c7fb12e4e833bd98290a0ee3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue