添加操作步骤
This commit is contained in:
parent
fe3c3f9157
commit
7a683b707d
Binary file not shown.
|
@ -2835,7 +2835,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
triggerID: 0
|
||||
triggerName:
|
||||
triggerName: "\u68C0\u67E5\u63A5\u7EBF"
|
||||
_highlight: {fileID: 0}
|
||||
isChecked: 0
|
||||
--- !u!1 &991594635
|
||||
|
@ -5604,6 +5604,10 @@ PrefabInstance:
|
|||
propertyPath: triggerName
|
||||
value: "\u7535\u80FD\u8868\u5C01\u53702"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2576541079921355268, guid: 10f4454f32eb20e4298912d896f6020e, type: 3}
|
||||
propertyPath: triggerName
|
||||
value: "\u7535\u80FD\u8868\u94ED\u724C"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2576541080106509928, guid: 10f4454f32eb20e4298912d896f6020e, type: 3}
|
||||
propertyPath: hasElectricity
|
||||
value: 1
|
||||
|
@ -6644,6 +6648,18 @@ PrefabInstance:
|
|||
m_Modification:
|
||||
m_TransformParent: {fileID: 543450652271447145}
|
||||
m_Modifications:
|
||||
- target: {fileID: 5948617165021199511, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3}
|
||||
propertyPath: triggerName
|
||||
value: "in\u5F00\u5173_\u87BA\u4E1D1"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5948617165317844720, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3}
|
||||
propertyPath: triggerName
|
||||
value: "in\u5F00\u5173_\u87BA\u4E1D2"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5948617165317844723, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3}
|
||||
propertyPath: triggerName
|
||||
value: "in\u5F00\u5173_\u87BA\u4E1D3"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6126868798989584877, guid: c80ccdb516dbab94083bd57fa1650eda, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 1
|
||||
|
|
|
@ -18,26 +18,29 @@ public class Device_Switch : Device_Base
|
|||
/// <param name="actionBack"></param>
|
||||
public void AddAction(Action<bool> actionBack)
|
||||
{
|
||||
this.actionBack= actionBack;
|
||||
this.actionBack = actionBack;
|
||||
}
|
||||
|
||||
private void OnMouseDown()
|
||||
{
|
||||
if(isOpen)
|
||||
if ((triggerAction == null ? 0 : triggerAction.Invoke(triggerName, true)) == 0)
|
||||
{
|
||||
isOpen = false;
|
||||
transform.localEulerAngles = new Vector3(0, 45, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
isOpen = true;
|
||||
transform.localEulerAngles = new Vector3(0, 0, 0);
|
||||
}
|
||||
if (isOpen)
|
||||
{
|
||||
isOpen = false;
|
||||
transform.localEulerAngles = new Vector3(0, 45, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
isOpen = true;
|
||||
transform.localEulerAngles = new Vector3(0, 0, 0);
|
||||
}
|
||||
|
||||
//调用自定义事件
|
||||
if (actionBack != null)
|
||||
{
|
||||
actionBack.Invoke(isOpen);
|
||||
//µ÷ÓÃ×Ô¶¨Òåʼþ
|
||||
if (actionBack != null)
|
||||
{
|
||||
actionBack.Invoke(isOpen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue