using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using JC.Unity; /* * 姿态角鼠标 * SmartBow_事件系统 * 可进入硬件控制虚拟鼠标模式 */ public class SB_EventSystem : MonoBehaviour { public static SB_EventSystem ins; void Awake() { if (ins) { Destroy(this.gameObject); } else { ins = this; DontDestroyOnLoad(this.gameObject); AwakenSimulateMouse(); } } void Start() { InitListenerForMouseHoverHightColor(); if (CommonConfig.StandaloneMode) gameObject.AddComponent(); } void Update() { //mouseTest.Update(); if (!(ScreenLocate.Main != null && ScreenLocate.Main.DebugOnZIMDemo)) { UpdateMoveSimulateMouse(); } } [SerializeField] public MouseConfirm mouseConfirm; [SerializeField] public SimulateMouse simulateMouse; #region 客户要求鼠标点到按钮时,按钮高亮 // Color pointerHoverColor = new Color(233f/255, 233f/255, 233f/255, 128f/255); void InitListenerForMouseHoverHightColor() { simulateMouse.OnPointerEnter += (Selectable target) => { mouseConfirm.SetSelectable(target); // Button btn = target.GetComponent