Beispiel #1
0
 def __init__(self, Device_Name, Sample_Path):
     self.ADB = adb.ADB(Device_Name=Device_Name, Screen_Size=[1280, 720])
     #啟動截圖線程
     self.Game_Screen = self.ADB.ScreenHot
     self.Sample_Image = dict()
     #導入範例檔案
     self.Import_Sample_Image(Sample_Path)
Beispiel #2
0
    def __init__(self, Device_Name, Sample_Path):
        self.ADB = adb.ADB(Device_Name=Device_Name)
        #啟動截圖線程
        # self.Game_Screen = self.ADB.ScreenHot
        self.Sample_Image = dict()
        #導入範例檔案
        self.Import_Sample_Image(Sample_Path)

        self.ADB.Keep_Game_ScreenHot(Emu_Index=0, file_name='test.png')

        while self.ADB.ScreenHot == None:
            print("等待…")
            time.sleep(0.1)
Beispiel #3
0
    def __init__(self, Device_Name, Sample_Path):
        self.Btn_Map = {}
        self.Btn_Map['Menu'] = [1077, 87]  #[1237, 45]
        self.Btn_Map['Menu_Sign_in'] = [943, 210]  #[1006, 327]
        self.Btn_Map['Menu_Mail_Box'] = [879, 340]  # jerry modify
        self.Btn_Map['Menu_Blood_League_Sign_in'] = [815, 270]  # jerry modify

        #unadjuest
        self.Btn_Map['Menu_Mail_Box_All_Taken'] = [957, 615]  #[1084, 662]
        self.Menu_Red_Point = [1090, 66, 1090 + 10, 66 + 10]
        self.MailBox_Red_Point = [890, 310, 890 + 10, 310 + 10]
        """
        Btn_Map = {}
        Btn_Map['F1'] = [544, 637]
        Btn_Map['F2'] = [620, 637]
        Btn_Map['F3'] = [706, 637]
        Btn_Map['F4'] = [784, 637]
        Btn_Map['F5'] = [960, 637]
        Btn_Map['F6'] = [1047, 637]
        Btn_Map['F7'] = [1125, 637]
        Btn_Map['F8'] = [1203, 637]
        Btn_Map['Auto'] = [970, 512]
        Btn_Map['Self'] = [1060, 402]
        Btn_Map['Pick_up'] = [1168, 429]
        Btn_Map['Attack'] = [1104, 520]
        Btn_Map['Store'] = [935, 45]
        Btn_Map['Item_Box'] = [1009, 45]
        Btn_Map['Skill'] = [1080, 45]
        Btn_Map['Mission'] = [1161, 45]
        Btn_Map['Mission_Close_Menu'] = [1237, 45]
        Btn_Map['Menu'] = [1746, 101] #[1237, 45]
        Btn_Map['Menu_Sign_in'] = [1539, 288] #[1006, 327]
        Btn_Map['Menu_Mail_Box'] = [1313, 469] # jerry modify 
        Btn_Map['Menu_Mail_Box_All_Taken'] = [1414, 876] #[1084, 662]
        """

        #config = configparser.ConfigParser()
        #config.read('Properties.py')
        self.ADB = adb.ADB(Device_Name=Device_Name, Screen_Size=[1280, 720])
        #啟動截圖線程
        # self.Game_Screen = self.ADB.ScreenHot
        self.Sample_Image = dict()

        #導入範例檔案 red_water_zero
        # Data/Sample_img/xxx.png  會變成 Sample_Image[red_water_zero] = ../Data/Sample_img/red_water_zero
        self.Import_Sample_Image(Sample_Path)

        #持續抓圖到 test.png
        self.ADB.Keep_Game_ScreenHot(Emu_Index=0, file_name='test.png')

        #initial 等待抓到圖
        while self.ADB.ScreenHot == None:
            print("等待抓到第一張圖…")
            time.sleep(1)

        while 1:
            rs = self.Check_And_Take_Sign_MailBox()
            #if rs == 1:
            #    print("有新訊息哦")
            #else:
            #    print("沒有新訊息哦")
            time.sleep(1)
Beispiel #4
0
 def __init__(self, Device_Name):
     self.ADB = adb.ADB(Device_Name=Device_Name)