ICe 2 ماه پیش
والد
کامیت
30cb637f02

BIN
opencv/scene/activity/back.png


BIN
opencv/scene/activity/bingo.png


BIN
opencv/scene/activity/bingoDo.png


BIN
opencv/scene/activity/check.png


BIN
opencv/scene/activity/enter.png


BIN
opencv/scene/ip1.png


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

@@ -13,6 +13,7 @@ import java.awt.AWTException;
 @SceneAnnotation("")
 public class SceneMain extends BaseScene implements Scene {
     private static String PathCheck = System.getProperty("user.dir") + "\\opencv\\scene\\check.png";
+    private static String PathIp1 = System.getProperty("user.dir") + "\\opencv\\scene\\ip1.png";
     @Override
     public void back() {
     }
@@ -31,7 +32,9 @@ public class SceneMain extends BaseScene implements Scene {
 
     @Override
     public void think() throws Exception {
-
+        if (checkHas(PathIp1, AiManage.getInstance().getCheckPoint())) {
+            moveToClick(PathIp1, AiManage.getInstance().getCheckPoint());
+        }
     }
 
     @Override

+ 75 - 0
src/main/java/com/sencorsta/rabs/obj/ai/scene/activity/SceneMain_Activity.java

@@ -0,0 +1,75 @@
+package com.sencorsta.rabs.obj.ai.scene.activity;
+
+import cn.hutool.core.thread.ThreadUtil;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.sencorsta.rabs.annotation.SceneAnnotation;
+import com.sencorsta.rabs.obj.ai.AiManage;
+import com.sencorsta.rabs.obj.ai.api.BaseScene;
+import com.sencorsta.rabs.obj.ai.api.Scene;
+
+import java.awt.AWTException;
+
+/**
+ * 活动
+ */
+@SceneAnnotation("SceneMain")
+public class SceneMain_Activity extends BaseScene implements Scene {
+    @JsonIgnore
+    @Override
+    public float getPriority() {
+        return 0.9f;
+    }
+
+    private static String PathEnter = System.getProperty("user.dir") + "\\opencv\\scene\\activity\\enter.png";
+    private static String PathCheck = System.getProperty("user.dir") + "\\opencv\\scene\\activity\\check.png";
+    private static String PathBack = System.getProperty("user.dir") + "\\opencv\\scene\\activity\\back.png";
+    private static String PathBingo = System.getProperty("user.dir") + "\\opencv\\scene\\activity\\bingo.png";
+    private static String PathBingoDo = System.getProperty("user.dir") + "\\opencv\\scene\\activity\\bingoDo.png";
+
+    @Override
+    public void back() throws AWTException {
+        moveToClick(PathBack, AiManage.getInstance().getCheckPoint());
+    }
+
+    @Override
+    public void open() throws AWTException {
+        while (AiManage.getInstance().isRunning() && !check()) {
+            AiManage.getInstance().updateWindow();
+            ThreadUtil.sleep(2000);
+            if (checkHas(PathEnter, AiManage.getInstance().getCheckPoint())) {
+                moveToClick(PathEnter, AiManage.getInstance().getCheckPoint());
+                continue;
+            }
+        }
+    }
+
+    @Override
+    public boolean check() throws AWTException {
+        if (checkHas(PathCheck, AiManage.getInstance().getCheckPoint())) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public void think() throws AWTException {
+        if (checkHas(PathBingo, AiManage.getInstance().getCheckPoint())) {
+            moveToClick(PathBingo, AiManage.getInstance().getCheckPoint());
+            ThreadUtil.sleep(2000);
+
+            if (checkHas(PathBingoDo,AiManage.getInstance().getCheckPoint())){
+                moveToClick(PathBingoDo, AiManage.getInstance().getCheckPoint());
+                ThreadUtil.sleep(3000);
+            }
+
+            getRecord().getData().setDone(true);
+        }
+
+    }
+
+    @Override
+    public boolean isDone() {
+        return getRecord().getData().isDone();
+    }
+
+}