This commit is contained in:
parent
d8c5f310db
commit
436a5c2213
|
@ -694,6 +694,10 @@ PrefabInstance:
|
|||
propertyPath: m_Layer
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1342273091210630203, guid: fe4c1814d44af964c94c33808b704426, type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: b9f45527b9d758746ba04747688797b6, type: 2}
|
||||
- target: {fileID: 1711505207429034123, guid: fe4c1814d44af964c94c33808b704426, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
|
|
|
@ -211,7 +211,8 @@ public class Device_3Phase4WireMeter : Device_Base
|
|||
transform.localEulerAngles = Vector3.zero;
|
||||
}).OnComplete(() =>
|
||||
{
|
||||
LiveSceneManager.Instance.currentTool = null;
|
||||
LiveSceneManager.Instance.OnCheckSubProcess(false);
|
||||
|
||||
Debug.Log("电能表已安装");
|
||||
CallScoreAction(true);
|
||||
endAction?.Invoke();
|
||||
|
|
|
@ -31,6 +31,7 @@ public class Device_CabinetDoor : Device_Base
|
|||
transform.DOLocalRotate(new Vector3(0, 0, 180), 3).OnComplete(() =>
|
||||
{
|
||||
isOpen = true;
|
||||
int result = (triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true));
|
||||
endAction?.Invoke();
|
||||
});
|
||||
});
|
||||
|
@ -46,16 +47,17 @@ public class Device_CabinetDoor : Device_Base
|
|||
transform.Find("计量柜锁2/计量柜锁3").DOLocalRotate(new Vector3(0, 0, 0), 1).OnComplete(() =>
|
||||
{
|
||||
isOpen = false;
|
||||
int result = (triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true));
|
||||
endAction?.Invoke();
|
||||
});
|
||||
});
|
||||
}
|
||||
protected override void OnMDown()
|
||||
{
|
||||
if (LiveSceneManager.Instance.currentTool != null && LiveSceneManager.Instance.currentTool.name == "Ñéµç±Ê")
|
||||
if (LiveSceneManager.Instance.currentTool != null && LiveSceneManager.Instance.currentTool.name == "Ñéµç±Ê")
|
||||
return;
|
||||
|
||||
if ((triggerAction==null?0: triggerAction.Invoke(triggerName, true)) == 0)
|
||||
if ((triggerAction == null ? 0 : triggerAction.Invoke(triggerName, false)) == 0)
|
||||
{
|
||||
base.OnMDown();
|
||||
if (isOpen)
|
||||
|
@ -82,7 +84,7 @@ public class Device_CabinetDoor : Device_Base
|
|||
/// <summary>
|
||||
/// 门关闭状态
|
||||
/// </summary>
|
||||
public void CloseState()
|
||||
public void CloseState()
|
||||
{
|
||||
isOpen = false;
|
||||
transform.localEulerAngles = Vector3.zero;
|
||||
|
|
|
@ -87,7 +87,7 @@ public class Tool_Base : PermanentTriggerBase
|
|||
/// <summary>
|
||||
/// 工具回到手中
|
||||
/// </summary>
|
||||
public void ReBackHead()
|
||||
public void ReBackHead(Action back=null)
|
||||
{
|
||||
isMoving = true;
|
||||
transform.parent = Camera.main.transform;
|
||||
|
@ -98,6 +98,7 @@ public class Tool_Base : PermanentTriggerBase
|
|||
transform.localEulerAngles = head_LocalEulerAnglesl;
|
||||
isMoving = false;
|
||||
endAction?.Invoke();
|
||||
back?.Invoke();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ public class Tool_TestPen : Tool_Base
|
|||
{
|
||||
var tmp = ((Device_Socket)device_base);
|
||||
//位置移动
|
||||
base.startAction?.Invoke();
|
||||
transform.parent = null;
|
||||
transform.DORotate(tmp.testPosAndRot.eulerAngles, 0.5f);
|
||||
transform.DOMove(tmp.testPosAndRot.position, 1).OnComplete(() =>
|
||||
|
@ -83,6 +84,7 @@ public class Tool_TestPen : Tool_Base
|
|||
isFlicker = tmp.hasElectricity;
|
||||
screem.materials[0].color = isFlicker ? Color.red : Color.white;
|
||||
int index = (triggerAction == null ? 0 : triggerAction.Invoke($"{triggerName}+{device_base.triggerName}", true));
|
||||
base.endAction?.Invoke();
|
||||
base.CallScoreAction(null, $"{triggerName}+{device_base.triggerName}");
|
||||
});
|
||||
}
|
||||
|
@ -91,6 +93,7 @@ public class Tool_TestPen : Tool_Base
|
|||
var tmp = ((Device_CabinetDoor)device_base);
|
||||
|
||||
//位置移动
|
||||
base.startAction?.Invoke();
|
||||
transform.parent = null;
|
||||
transform.DOLocalRotate(tmp.testPosAndRot.localEulerAngles, 0.5f);
|
||||
transform.DOMove(tmp.testPosAndRot.position, 1).OnComplete(() =>
|
||||
|
@ -99,6 +102,7 @@ public class Tool_TestPen : Tool_Base
|
|||
isFlicker = tmp.hasElectricity;
|
||||
screem.materials[0].color = isFlicker ? Color.red : Color.white;
|
||||
int index = (triggerAction == null ? 0 : triggerAction.Invoke($"{triggerName}+{device_base.triggerName}", true));
|
||||
base.endAction?.Invoke();
|
||||
base.CallScoreAction(null, $"{triggerName}+{device_base.triggerName}");
|
||||
});
|
||||
}
|
||||
|
@ -125,6 +129,7 @@ public class Tool_TestPen : Tool_Base
|
|||
Debug.Log("螺丝 已验电");
|
||||
isFlicker = tmp.hasElectricity;
|
||||
screem.materials[0].color = isFlicker ? Color.red : Color.white;
|
||||
base.endAction?.Invoke();
|
||||
base.CallScoreAction(null, $"{triggerName}+{tool_base.triggerName}");
|
||||
});
|
||||
}
|
||||
|
|
|
@ -52,9 +52,11 @@ public class Tool_WireStripper : Tool_Base
|
|||
//źôśĎ
|
||||
device_Seal.Cut();
|
||||
isMoving = false;
|
||||
|
||||
ReBackHead();
|
||||
int result = (triggerAction == null ? 0 : triggerAction.Invoke(device_Seal.triggerName, true));
|
||||
|
||||
ReBackHead(() =>
|
||||
{
|
||||
int result = (triggerAction == null ? 0 : triggerAction.Invoke(device_Seal.triggerName, true));
|
||||
});
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
|
|
@ -88,9 +88,10 @@ public class LiveSceneManager : SingletonMono<LiveSceneManager>
|
|||
}
|
||||
}
|
||||
|
||||
public void OnCheckSubProcess()
|
||||
public void OnCheckSubProcess(bool ifdestroy=true)
|
||||
{
|
||||
tMDTips.gameObject.SetActive(false);
|
||||
Destroy(currentTool);
|
||||
if (ifdestroy)
|
||||
Destroy(currentTool);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue