diff --git a/Assets/Scripts/Dialog System/LineView.cs b/Assets/Scripts/Dialog System/LineView.cs index 06345a8c5..417a521db 100644 --- a/Assets/Scripts/Dialog System/LineView.cs +++ b/Assets/Scripts/Dialog System/LineView.cs @@ -20,7 +20,7 @@ namespace AibisDream EnumEventSystem.Global.Send(DialogEventEnum.LineStart, DialogText.GetLine(dialogueLine)); - HandleLineOutput(dialogueLine, onDialogueLineFinished); + HandleLineOutput(dialogueLine, NextStep); if (DialogController.Instance.quickRunMode) { @@ -43,6 +43,13 @@ namespace AibisDream } Debug.Log($"[对话流程] [{lineId}] ===== 处理完成 ====="); + return; + + void NextStep() + { + EnumEventSystem.Global.Send(DialogEventEnum.LineEnd); + onDialogueLineFinished(); + } } private void HandleLineOutput(LocalizedLine dialogueLine, Action onDialogueLineFinished) diff --git a/Assets/Scripts/FixSystemNew/BodyModule/CableSystem.cs b/Assets/Scripts/FixSystemNew/BodyModule/CableSystem.cs index 9aa6f0546..ab9bf978e 100644 --- a/Assets/Scripts/FixSystemNew/BodyModule/CableSystem.cs +++ b/Assets/Scripts/FixSystemNew/BodyModule/CableSystem.cs @@ -149,7 +149,6 @@ namespace AibisDream.FixSystem private void HandleDialogueComplete() { - Debug.Log("Dialog End"); isInDialog = false; } diff --git a/Assets/Scripts/FixSystemNew/Screen System/ScreenSystem.cs b/Assets/Scripts/FixSystemNew/Screen System/ScreenSystem.cs index 5dcf62166..08f73700b 100644 --- a/Assets/Scripts/FixSystemNew/Screen System/ScreenSystem.cs +++ b/Assets/Scripts/FixSystemNew/Screen System/ScreenSystem.cs @@ -127,8 +127,7 @@ namespace AibisDream.FixSystem ActionKit.Delay(0.1f, () => { Debug.Log("[ScreenSystem] AfterLineShown - 延迟结束,调用回调"); - EnumEventSystem.Global.Send(DialogEventEnum.LineEnd); - nextStop.Invoke(); + nextStop?.Invoke(); Debug.Log("[ScreenSystem] AfterLineShown - 回调调用完成"); }).StartGlobal(); typewriter.onTextShowed.RemoveAllListeners(); diff --git a/Assets/Scripts/FixSystemNew/Screen System/TaskScreen.cs b/Assets/Scripts/FixSystemNew/Screen System/TaskScreen.cs index 4e4c59d69..7213e77e8 100644 --- a/Assets/Scripts/FixSystemNew/Screen System/TaskScreen.cs +++ b/Assets/Scripts/FixSystemNew/Screen System/TaskScreen.cs @@ -49,7 +49,6 @@ namespace AibisDream if (_taskDict.ContainsKey(lineId)) { EnumEventSystem.Global.Send(DialogEventEnum.LineShown); - EnumEventSystem.Global.Send(DialogEventEnum.LineEnd); nextStep.Invoke(); return; } @@ -60,7 +59,6 @@ namespace AibisDream _taskDict[lineId] = taskItem; EnumEventSystem.Global.Send(DialogEventEnum.LineShown); - EnumEventSystem.Global.Send(DialogEventEnum.LineEnd); nextStep.Invoke(); LayoutRebuilder.ForceRebuildLayoutImmediate(_taskListParent.GetComponent()); } diff --git a/Assets/Scripts/Framework/EventSystemKit/EventSystemEx.cs b/Assets/Scripts/Framework/EventSystemKit/EventSystemEx.cs index 02521127c..c2066436c 100644 --- a/Assets/Scripts/Framework/EventSystemKit/EventSystemEx.cs +++ b/Assets/Scripts/Framework/EventSystemKit/EventSystemEx.cs @@ -47,14 +47,6 @@ namespace AibisDream.Framework } } - #endregion - - #region 事件注册 - - public override void OnSingletonInit() - { - } - #endregion #region 单例必须的代码 @@ -62,6 +54,10 @@ namespace AibisDream.Framework private EventSystemEx() { } + + public override void OnSingletonInit() + { + } #endregion } diff --git a/Assets/Scripts/MiniGame/Gear/Gear.cs b/Assets/Scripts/MiniGame/Gear/Gear.cs index 81d3cd4a4..09c9fd647 100644 --- a/Assets/Scripts/MiniGame/Gear/Gear.cs +++ b/Assets/Scripts/MiniGame/Gear/Gear.cs @@ -40,8 +40,8 @@ namespace AibisDream _trigger = GetComponent(); _trigger.Register(EventTriggerType.Drag, OnDrag); - _trigger.Register(EventTriggerType.BeginDrag, StartMove); - _trigger.Register(EventTriggerType.EndDrag, StopMove); + _trigger.Register(EventTriggerType.PointerDown, StartMove); + _trigger.Register(EventTriggerType.PointerUp, StopMove); } private void Start() @@ -108,10 +108,10 @@ namespace AibisDream transform.DOPause(); } - public void StopMove(BaseEventData eventData) + private void StopMove(BaseEventData eventData) { // 正常情况下不会出错 - if (eventData is not PointerEventData pointerData) return; + if (eventData is not PointerEventData) return; if (targetShaft) { diff --git a/Assets/Scripts/UI/Cursor/CursorManager.cs b/Assets/Scripts/UI/Cursor/CursorManager.cs index 31c92a729..b87bbe059 100644 --- a/Assets/Scripts/UI/Cursor/CursorManager.cs +++ b/Assets/Scripts/UI/Cursor/CursorManager.cs @@ -14,15 +14,14 @@ namespace AibisDream { private const float DelayTime = 0.1f; - [SerializeField] - private GameObject border; - + [SerializeField] private GameObject border; + [Header("指针图片")] public Sprite defaultCursor; public Sprite nextTalk, talking, option, interactive, holding, disable; private Image _cursor; private GraphicRaycaster _raycaster; - + private Sprite _curCursor; private CursorState _stateCache; @@ -113,10 +112,10 @@ namespace AibisDream private void OnGameQuit() { _curCursor = defaultCursor; - + _curState = CursorState.Default; _stateCache = CursorState.Default; - + _isInGame = false; } @@ -165,7 +164,7 @@ namespace AibisDream { if (!_isInGame) return; if (!Input.GetMouseButtonDown(0) && !Input.GetKeyDown(KeyCode.Space)) return; - + // 控制对话 if (_isTalking) { @@ -179,15 +178,15 @@ namespace AibisDream { return false; } - + var eventData = new PointerEventData(EventSystem.current) { position = Input.mousePosition }; - + var results = new List(); _raycaster.Raycast(eventData, results); - + return results.Count > 0 && results.Any(result => result.gameObject.CompareTag("Selectable")); } @@ -247,6 +246,10 @@ namespace AibisDream { SwitchCursor(interactive); } + else + { + SwitchCursor(defaultCursor); + } } private void OnInteractiveEnd() diff --git a/Assets/Scripts/UI/DialogUI/Bubbles/BubbleGroup.cs b/Assets/Scripts/UI/DialogUI/Bubbles/BubbleGroup.cs index 1243fe858..66c1badb8 100644 --- a/Assets/Scripts/UI/DialogUI/Bubbles/BubbleGroup.cs +++ b/Assets/Scripts/UI/DialogUI/Bubbles/BubbleGroup.cs @@ -176,7 +176,6 @@ namespace AibisDream } Debug.Log("[BubbleGroup] NextStep - 发送LineEnd事件"); - EnumEventSystem.Global.Send(DialogEventEnum.LineEnd); var next = _nextStep; _nextStep = null; diff --git a/Assets/Scripts/UI/DialogUI/CenterText.cs b/Assets/Scripts/UI/DialogUI/CenterText.cs index 49bf70a2e..3f0c3adfb 100644 --- a/Assets/Scripts/UI/DialogUI/CenterText.cs +++ b/Assets/Scripts/UI/DialogUI/CenterText.cs @@ -73,7 +73,7 @@ namespace AibisDream if (_nextStep == null) return; ClearBox(); - EnumEventSystem.Global.Send(DialogEventEnum.LineEnd); + var next = _nextStep; _nextStep = null; next.Invoke(); diff --git a/Assets/StreamingAssets/Config/setting.json b/Assets/StreamingAssets/Config/setting.json index 09a56f3e5..aa27e8fda 100644 --- a/Assets/StreamingAssets/Config/setting.json +++ b/Assets/StreamingAssets/Config/setting.json @@ -1,5 +1,5 @@ { "Volume": "0.89", "Language": "zh-Hans", - "WindowMode": "MaximizedWindow" + "WindowMode": "Windowed" } \ No newline at end of file