MCPcopy Create free account
hub / github.com/HelloBush/Java_MHXYdemo / GameSeek

Method GameSeek

src/pkgAssist/MhxyAssist.java:239–266  ·  view source on GitHub ↗

��dm���󶨵���Ϸ��ǰ������Ѱ��ָ��ͼƬ @param dm ָ�����˾���Ĵ�Į���� @param seekPicPath ����ͼƬ��·�� @return ����ImgSeekBean����

(Dm2Java dm,String seekPicPath)

Source from the content-addressed store, hash-verified

237 * @return ����ImgSeekBean����
238 */
239 public static ImgSeekBean GameSeek(Dm2Java dm,String seekPicPath){
240
241 String gamePicPath = "./res/pics/pic_temp/game.jpg";
242 dm.DeleteFile(gamePicPath);
243 dm.Capture(GB.getGx(),GB.getGy(), GB.getWidth(), GB.getHeight(), gamePicPath);
244 ImgSeekBean isb = new ImgSeekBean();
245 isb = ImgSeek.findImg(seekPicPath, gamePicPath,false);
246 if(isb.isSeek()&&isb.getX1()!=-1){
247 int x = isb.getX1()+(isb.getX2()-isb.getX1())/2,
248 y = isb.getY1()+(isb.getY2()-isb.getY1())/2;
249 isb.setMidX(x);
250 isb.setMidY(y);
251// System.out.println("ģ��ͼ��ԭͼƥ��ɹ���");
252// System.out.println("ƥ�����Ͻ�λ��(x1="+isb.getX1()+",y1="+isb.getY1()+")");
253// System.out.println("ƥ�����½�λ��(x2="+isb.getX2()+",y2="+isb.getY2()+")");
254
255 }
256 else{
257 isb.setSeek(false);
258// System.out.println("ģ��ͼ��ԭͼƥ��ʧ��.");
259 }
260//
261// System.out.println("ģ��ͼ������������" + isb.getTempKeyPointsNum());
262// System.out.println("ƥ���������������" + isb.getMatchKeyPointsNum());
263
264 return isb;
265
266 }
267
268 /**
269 * ��Ե���������͵��쳣�������Ļ����

Callers 4

Job_BaoTuMethod · 0.95
Job_GuiMethod · 0.95
GameStateMethod · 0.95
GameClearMethod · 0.95

Calls 15

findImgMethod · 0.95
isSeekMethod · 0.95
getX1Method · 0.95
getX2Method · 0.95
getY1Method · 0.95
getY2Method · 0.95
setMidXMethod · 0.95
setMidYMethod · 0.95
setSeekMethod · 0.95
DeleteFileMethod · 0.80
CaptureMethod · 0.80
getGxMethod · 0.80

Tested by

no test coverage detected