41 lines
1004 B
C#
41 lines
1004 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
/// <summary>
|
|
/// 变速箱取力下部
|
|
/// </summary>
|
|
public class PowerSwitchDownBtn : PermanentTriggerBase
|
|
{
|
|
|
|
public FunctionSync_PositionRoate linkageObject;
|
|
/// <summary>
|
|
/// 总电源
|
|
/// </summary>
|
|
public OneValueSyncObject mainSwitch;
|
|
/// <summary>
|
|
/// 取力开关
|
|
/// </summary>
|
|
public OneValueSyncObject switchOn;
|
|
protected override void OnMDown()
|
|
{
|
|
//base.PressedEvent();
|
|
linkageObject.transform.localEulerAngles = new Vector3(-6, 0, 0);
|
|
linkageObject.ReleaseControl();
|
|
if (mainSwitch.mybool)
|
|
{
|
|
switchOn.mybool = true;
|
|
switchOn.SendSync();
|
|
if (switchOn.action_apprisedetail != null) switchOn.action_apprisedetail.Invoke();
|
|
|
|
}
|
|
|
|
|
|
StepManager.Instance.FinishStep(triggerName);
|
|
}
|
|
//public override void Init()
|
|
//{
|
|
// base.Init();
|
|
|
|
//}
|
|
}
|