修改收回逻辑
This commit is contained in:
parent
f3cfd65e99
commit
fb931b9b7c
|
|
@ -212,10 +212,9 @@ public class Device_3Phase4WireMeter : Device_Base
|
||||||
}).OnComplete(() =>
|
}).OnComplete(() =>
|
||||||
{
|
{
|
||||||
LiveSceneManager.Instance.OnCheckSubProcess(false);
|
LiveSceneManager.Instance.OnCheckSubProcess(false);
|
||||||
|
|
||||||
Debug.Log("电能表已安装");
|
Debug.Log("电能表已安装");
|
||||||
CallScoreAction(true);
|
CallScoreAction(true);
|
||||||
endAction?.Invoke();
|
//endAction?.Invoke();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ public class LiveSceneManager : SingletonMono<LiveSceneManager>
|
||||||
{
|
{
|
||||||
[HideInInspector]
|
[HideInInspector]
|
||||||
public FirstPersonController firstPersonController;
|
public FirstPersonController firstPersonController;
|
||||||
[HideInInspector]
|
//[HideInInspector]
|
||||||
public GameObject currentTool;
|
public GameObject currentTool;
|
||||||
public Transform spawnToolPos;
|
public Transform spawnToolPos;
|
||||||
public Transform tMDTips;
|
public Transform tMDTips;
|
||||||
|
|
@ -57,8 +57,7 @@ public class LiveSceneManager : SingletonMono<LiveSceneManager>
|
||||||
{
|
{
|
||||||
GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(intTemp, true);
|
GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(intTemp, true);
|
||||||
ScoreManager.instance.Check(currentTool.name, null);
|
ScoreManager.instance.Check(currentTool.name, null);
|
||||||
if (currentTool != null)
|
OnCheckSubProcess();
|
||||||
Destroy(currentTool);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
tMDTips.gameObject.SetActive(false);
|
tMDTips.gameObject.SetActive(false);
|
||||||
|
|
@ -70,6 +69,8 @@ public class LiveSceneManager : SingletonMono<LiveSceneManager>
|
||||||
tMDTips.gameObject.SetActive(false);
|
tMDTips.gameObject.SetActive(false);
|
||||||
currentTool.transform.localEulerAngles = new Vector3(-90, 0, -180);
|
currentTool.transform.localEulerAngles = new Vector3(-90, 0, -180);
|
||||||
}
|
}
|
||||||
|
if (GameManager.RunModelMgr.ModeType != E_ModeType.Study)
|
||||||
|
GameManager.EventMgr.EventTrigger<bool>(Enum_EventType.TakeOutAndRetrievingTheTools, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
|
@ -81,8 +82,7 @@ public class LiveSceneManager : SingletonMono<LiveSceneManager>
|
||||||
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, true) == 0)
|
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, true) == 0)
|
||||||
{
|
{
|
||||||
Debug.Log("Escape");
|
Debug.Log("Escape");
|
||||||
tMDTips.gameObject.SetActive(false);
|
OnCheckSubProcess();
|
||||||
Destroy(currentTool);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -94,5 +94,8 @@ public class LiveSceneManager : SingletonMono<LiveSceneManager>
|
||||||
tMDTips.gameObject.SetActive(false);
|
tMDTips.gameObject.SetActive(false);
|
||||||
if (ifdestroy)
|
if (ifdestroy)
|
||||||
Destroy(currentTool);
|
Destroy(currentTool);
|
||||||
|
currentTool = null;
|
||||||
|
if (GameManager.RunModelMgr.ModeType != E_ModeType.Study)
|
||||||
|
GameManager.EventMgr.EventTrigger<bool>(Enum_EventType.TakeOutAndRetrievingTheTools, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,14 @@ public class UI_MenuBar : BasePanel
|
||||||
GameManager.EventMgr.AddEventListener<E_SceneType>(Enum_EventType.SwitchScene, CheckBtnBySceneName);
|
GameManager.EventMgr.AddEventListener<E_SceneType>(Enum_EventType.SwitchScene, CheckBtnBySceneName);
|
||||||
if (GameManager.RunModelMgr.ModeType == E_ModeType.Study)
|
if (GameManager.RunModelMgr.ModeType == E_ModeType.Study)
|
||||||
GameManager.EventMgr.AddEventListener<string>(Enum_EventType.SwitchSubProcessStepTriggerID, SwitchSubProcessStepTriggerID);
|
GameManager.EventMgr.AddEventListener<string>(Enum_EventType.SwitchSubProcessStepTriggerID, SwitchSubProcessStepTriggerID);
|
||||||
|
else
|
||||||
|
GameManager.EventMgr.AddEventListener<bool>(Enum_EventType.TakeOutAndRetrievingTheTools, TakeOutAndRetrievingTheTools);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TakeOutAndRetrievingTheTools(bool isOn)
|
||||||
|
{
|
||||||
|
toolKitBtn.interactable = isOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SwitchSubProcessStepTriggerID(string triggerID)
|
private void SwitchSubProcessStepTriggerID(string triggerID)
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,6 @@ public class UI_ToolAndMaterialPanel : BasePanel
|
||||||
{
|
{
|
||||||
if (GameManager.RunModelMgr.ModeType == E_ModeType.Study)
|
if (GameManager.RunModelMgr.ModeType == E_ModeType.Study)
|
||||||
GetControl<Button>("closeBtn").interactable = false;
|
GetControl<Button>("closeBtn").interactable = false;
|
||||||
if (GameManager.RunModelMgr.SceneType != E_SceneType.ToolRoom)
|
|
||||||
GetControl<Button>("closeBtn").gameObject.SetActive(false);
|
|
||||||
CreatItem(E_ToolOrDeviceOrMaterials.Tool); //默认打开显示工器具
|
CreatItem(E_ToolOrDeviceOrMaterials.Tool); //默认打开显示工器具
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,4 +54,8 @@ public enum Enum_EventType
|
||||||
/// 穿戴状态
|
/// 穿戴状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
WearState,
|
WearState,
|
||||||
|
/// <summary>
|
||||||
|
/// 掏出和收回工具
|
||||||
|
/// </summary>
|
||||||
|
TakeOutAndRetrievingTheTools,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue