ICe 1 month ago
parent
commit
f4fc7a7999

BIN
opencv/scene/explore/king/kings/iKnow.png


BIN
opencv/scene/ip4.png


BIN
opencv/scene/ip4Check.png


+ 23 - 11
src/main/java/com/sencorsta/rabs/obj/ai/api/BaseScene.java

@@ -252,17 +252,29 @@ public class BaseScene {
     }
 
     public void checkBeforeEnter() throws AWTException {
-        if (checkHas(SceneMain.getPathIp1(), AiManage.getInstance().getCheckPoint())) {
-            moveToClick(SceneMain.getPathIp1(),AiManage.getInstance().getCheckPoint());
-            ThreadUtil.sleep(2000);
-        }
-        if (checkHas(SceneMain.getPathIp2(), AiManage.getInstance().getCheckPoint())) {
-            moveToClick(SceneMain.getPathIp2(),AiManage.getInstance().getCheckPoint());
-            ThreadUtil.sleep(2000);
-        }
-        if (checkHas(SceneMain.getPathIp3(), AiManage.getInstance().getCheckPoint())) {
-            moveToClick(SceneMain.getPathIp3(),AiManage.getInstance().getCheckPoint());
-            ThreadUtil.sleep(2000);
+        while (true){
+            System.out.println("开始检查活动广告页....");
+            if (checkHas(SceneMain.getPathIp1(), AiManage.getInstance().getCheckPoint())) {
+                moveToClick(SceneMain.getPathIp1(),AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+                continue;
+            }
+            if (checkHas(SceneMain.getPathIp2(), AiManage.getInstance().getCheckPoint())) {
+                moveToClick(SceneMain.getPathIp2(),AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+                continue;
+            }
+            if (checkHas(SceneMain.getPathIp3(), AiManage.getInstance().getCheckPoint())) {
+                moveToClick(SceneMain.getPathIp3(),AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+                continue;
+            }
+            if (checkHas(SceneMain.getPathIp4Check(), AiManage.getInstance().getCheckPoint())) {
+                moveToClick(SceneMain.getPathIp4(),AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(2000);
+                continue;
+            }
+            break;
         }
     }
 

+ 4 - 0
src/main/java/com/sencorsta/rabs/obj/ai/scene/SceneMain.java

@@ -20,6 +20,10 @@ public class SceneMain extends BaseScene implements Scene {
     private static String PathIp2 = System.getProperty("user.dir") + "\\opencv\\scene\\ip2.png";
     @Getter
     private static String PathIp3 = System.getProperty("user.dir") + "\\opencv\\scene\\ip3.png";
+    @Getter
+    private static String PathIp4 = System.getProperty("user.dir") + "\\opencv\\scene\\ip4.png";
+    @Getter
+    private static String PathIp4Check = System.getProperty("user.dir") + "\\opencv\\scene\\ip4Check.png";
 
     @Override
     public void back() {

+ 10 - 0
src/main/java/com/sencorsta/rabs/obj/ai/scene/explore/SceneMain_Explore_King_kings.java

@@ -37,6 +37,10 @@ public class SceneMain_Explore_King_kings extends BaseScene implements Scene {
     private static String PathWeek = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\king\\kings\\week.png";
     private static String PathDay = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\king\\kings\\day.png";
     private static String PathClose = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\king\\kings\\close.png";
+    private static String PathIKnow = System.getProperty("user.dir") + "\\opencv\\scene\\explore\\king\\kings\\iKnow.png";
+
+
+
 
     private int maxCount=9;
     @Override
@@ -74,6 +78,12 @@ public class SceneMain_Explore_King_kings extends BaseScene implements Scene {
     public void think() throws AWTException {
         int count = getRecord().getData().getCount();
         ThreadUtil.sleep(5000);
+
+        if (checkHas(PathIKnow, AiManage.getInstance().getCheckPoint())) {
+            moveToClick(PathIKnow, AiManage.getInstance().getCheckPoint());
+            ThreadUtil.sleep(2000);
+        }
+
         if (count==2){
             moveToClick(PathDay, AiManage.getInstance().getCheckPoint());
             ThreadUtil.sleep(2000);