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