Commit d42612b0 authored by SherryChaos's avatar SherryChaos

Unify move-repeat speed API and refactor input handling

Replace legacy SetMoveRepeatRate with SetMoveRepeatSpeed and centralize move-repeat behavior in UserInput. UserInput now caches the InputSystemUIInputModule, computes moveRepeatRate from a speed factor, and exposes SetMoveRepeatSpeed to let screens adjust navigation repeat speed. The input update loop was refactored: axis repeat logic moved to UpdateAxisRepeat, hover detection consolidated into UpdateHoverObject using a cached CameraMain and EventSystem checks, and several touch-specific helpers were removed. Call sites (CutinViewer, DeckEditor, MateViewer) updated to call SetMoveRepeatSpeed with appropriate values; also minor fixes to light activation calls and platform conditional compilation for gamepad types.
parent 6646bfd0
...@@ -48,10 +48,16 @@ namespace MDPro3.Servant ...@@ -48,10 +48,16 @@ namespace MDPro3.Servant
LoadCutins(); LoadCutins();
} }
protected override void ApplyShowArrangement(int preDepth)
{
base.ApplyShowArrangement(preDepth);
UserInput.SetMoveRepeatSpeed(2f);
}
protected override void ApplyHideArrangement(int nextDepth) protected override void ApplyHideArrangement(int nextDepth)
{ {
base.ApplyHideArrangement(nextDepth); base.ApplyHideArrangement(nextDepth);
UserInput.SetMoveRepeatRate(0.1f); UserInput.SetMoveRepeatSpeed(1f);
if (randomBGMPlayed) if (randomBGMPlayed)
{ {
......
...@@ -115,6 +115,18 @@ namespace MDPro3.Servant ...@@ -115,6 +115,18 @@ namespace MDPro3.Servant
base.Initialize(); base.Initialize();
} }
protected override void ApplyShowArrangement(int preDepth)
{
base.ApplyShowArrangement(preDepth);
UserInput.SetMoveRepeatSpeed(0.8f);
}
protected override void ApplyHideArrangement(int nextDepth)
{
base.ApplyHideArrangement(nextDepth);
UserInput.SetMoveRepeatSpeed(1f);
}
public override void PerFrameFunction() public override void PerFrameFunction()
{ {
if (!NeedResponseInput()) if (!NeedResponseInput())
......
...@@ -47,20 +47,20 @@ namespace MDPro3.Servant ...@@ -47,20 +47,20 @@ namespace MDPro3.Servant
protected override void ApplyShowArrangement(int preDepth) protected override void ApplyShowArrangement(int preDepth)
{ {
base.ApplyShowArrangement(preDepth); base.ApplyShowArrangement(preDepth);
Program.instance.camera_.light.gameObject.SetActive(true); Program.instance.camera_.light.SetActive(true);
Program.instance.camera_.light.transform.GetChild(0).localEulerAngles = new Vector3(123f, -28f, -40f); Program.instance.camera_.light.transform.GetChild(0).localEulerAngles = new Vector3(123f, -28f, -40f);
Program.instance.camera_.light.transform.GetChild(1).localEulerAngles = new Vector3(-80f, -140f, 0f); Program.instance.camera_.light.transform.GetChild(1).localEulerAngles = new Vector3(-80f, -140f, 0f);
CameraManager.DuelOverlay2DPlus(); CameraManager.DuelOverlay2DPlus();
CameraReset(); CameraReset();
AudioManager.PlayBGM("BGM_OUT_TUTORIAL_2", 0.5f); AudioManager.PlayBGM("BGM_OUT_TUTORIAL_2", 0.5f);
UserInput.SetMoveRepeatRate(0.05f); UserInput.SetMoveRepeatSpeed(2f);
} }
protected override void ApplyHideArrangement(int preDepth) protected override void ApplyHideArrangement(int preDepth)
{ {
base.ApplyHideArrangement(preDepth); base.ApplyHideArrangement(preDepth);
CameraManager.DuelOverlay2DMinus(); CameraManager.DuelOverlay2DMinus();
Program.instance.camera_.light.gameObject.SetActive(false); Program.instance.camera_.light.SetActive(false);
Program.instance.camera_.light.transform.GetChild(0).localEulerAngles = new Vector3(96f, -28f, -40f); Program.instance.camera_.light.transform.GetChild(0).localEulerAngles = new Vector3(96f, -28f, -40f);
Program.instance.camera_.light.transform.GetChild(1).localEulerAngles = new Vector3(-15f, -45f, 0f); Program.instance.camera_.light.transform.GetChild(1).localEulerAngles = new Vector3(-15f, -45f, 0f);
if (mate != null) if (mate != null)
...@@ -68,7 +68,7 @@ namespace MDPro3.Servant ...@@ -68,7 +68,7 @@ namespace MDPro3.Servant
AudioManager.ResetSESource(); AudioManager.ResetSESource();
AudioManager.PlaySE("SE_MENU_CANCEL"); AudioManager.PlaySE("SE_MENU_CANCEL");
AudioManager.PlayBGM(AudioManager.BGM_MENU_MAIN); AudioManager.PlayBGM(AudioManager.BGM_MENU_MAIN);
UserInput.SetMoveRepeatRate(0.1f); UserInput.SetMoveRepeatSpeed(1f);
} }
public override void PerFrameFunction() public override void PerFrameFunction()
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment