Add point2 as the first step, trigger IsCheck, and enable Shose afterward
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user