using System.Collections; using System.Collections.Generic; using UnityEngine; /// /// 车控终端电源按钮 /// public class CarControlSwitchBtn : ButtonBase { /// /// 指示灯 /// public FunctionSync_Active indicatorLight; /// /// 车控终端电源 /// public OneValueSyncObject switchOn; public override void PressedEvent() { base.PressedEvent(); if (!switchOn.mybool) { indicatorLight.ShowObject(); switchOn.mybool = true; switchOn.SendSync(); if (switchOn.action_apprisedetail != null) switchOn.action_apprisedetail.Invoke(); } else { indicatorLight.DisShowObject(); switchOn.mybool = false; switchOn.SendSync(); if (switchOn.action_apprisedetail != null) switchOn.action_apprisedetail.Invoke(); } } public override void Init() { base.Init(); } }