using System.Collections; using System.Collections.Generic; using UnityEngine; /// /// 车控终端 /// public class CheKongZhongDuan : ButtonBase { public FunctionSync_Active chekong; public OneValueSyncObject detectionPower; public override void PressedEvent() { base.PressedEvent(); linkageObject.transform.localPosition = new Vector3(0.004f, 0, 0); linkageObject.GetControl(); detectionPower.mybool = !detectionPower.mybool; if (detectionPower.mybool) { detectionPower.SendSync(); if (detectionPower.action_apprisedetail != null) detectionPower.action_apprisedetail.Invoke(); chekong.ShowObject(); } else { chekong.DisShowObject(); } } public override void ReleasedEvent() { base.ReleasedEvent(); linkageObject.transform.localPosition = new Vector3(0.002f, 0, 0); linkageObject.ReleaseControl(); } public override void Init() { } }