Add point2 as the first step, trigger IsCheck, and enable Shose afterward

This commit is contained in:
yangbear
2026-07-11 04:50:21 +08:00
parent 7d22163cf6
commit 4b233758d5
6 changed files with 141 additions and 15 deletions
+11
View File
@@ -154,6 +154,17 @@ public class StepManager : MonoBehaviour
private bool TryClickActiveHandler()
{
var point2s = Object.FindObjectsOfType<Point2ClickHandler>();
foreach (var p in point2s)
{
if (p.gameObject.activeInHierarchy && p.CanBeClicked())
{
Debug.LogError($"====== StepManager: 模拟点击了 {p.name} ======");
p.PerformClick();
return true;
}
}
var touches = Object.FindObjectsOfType<TouchPositionHandler>();
System.Array.Sort(touches, (a, b) => string.Compare(a.name, b.name));
foreach (var t in touches)
+7 -1
View File
@@ -5,6 +5,7 @@ public static class ActionHistory
{
public enum ActionType
{
Point2,
Shose,
ChanraoTuibu,
PingFirst,
@@ -62,7 +63,12 @@ public static class ActionHistory
return true;
}
if (item.Type == ActionType.Shose)
if (item.Type == ActionType.Point2)
{
var h = item.Handler as Point2ClickHandler;
if (h != null) h.ResetState();
}
else if (item.Type == ActionType.Shose)
{
var h = item.Handler as ShoseClickHandler;
if (h != null) h.ResetState();