// using Fantasy.Async; // using Fantasy.Entitas; // using Fantasy.Entitas.Interface; // using Fantasy.Event; // using NBC; // using UnityEngine; // // namespace NBF.Fishing2 // { // public class CursorUIShowEvent : AsyncEventSystem // { // protected override async FTask Handler(UIShowEvent self) // { // var cursorComponent = App.Main.GetComponent(); // cursorComponent.UpdateCursor(); // } // // protected override FTask Handler(UIShowEvent self) // // { // // throw new System.NotImplementedException(); // // } // } // // public class CursorUIHideEvent : AsyncEventSystem // { // protected override async FTask Handler(UIHideEvent self) // { // var cursorComponent = App.Main.GetComponent(); // cursorComponent.UpdateCursor(); // } // } // // public class CursorComponent : Entity // { // #region System // // // // // public class CursorComponentAwakeSystem : AwakeSystem // // { // // protected override void Awake(CursorComponent self) // // { // // // // } // // } // // // // public class CursorComponentUpdateSystem : UpdateSystem // // { // // protected override void Update(CursorComponent self) // // { // // } // // } // // // // public class CursorComponentDestroySystem : DestroySystem // // { // // protected override void Destroy(CursorComponent self) // // { // // } // // } // // #endregion // // public void UpdateCursor() // { // bool showCursor = false; // var uis = App.UI.GetAllUI(); // foreach (var ui in uis) // { // if (ui.IsShowing && ui.IsShowCursor) // { // showCursor = true; // break; // } // } // // SetMouseCursor(showCursor); // } // // public ControllerType controllerType = ControllerType.GamePad; // // public void SetMouseCursor(bool val) // { // Log.Info($"设置鼠标光标==={val}"); // if (val) // { // if (controllerType == ControllerType.KeyboardMouse) // { // Cursor.visible = true; // } // // Cursor.lockState = CursorLockMode.None; // } // else if (controllerType == ControllerType.KeyboardMouse) // { // Cursor.visible = false; // } // // Cursor.visible = val; // if (!val) // { // Cursor.lockState = CursorLockMode.Confined; // } // } // } // }