本文整理汇总了Python中owanimo.util.log.LOG类的典型用法代码示例。如果您正苦于以下问题:Python LOG类的具体用法?Python LOG怎么用?Python LOG使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LOG类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: login
def login(self):
self.start()
time.sleep(15)
while not self.enable("login.png"):
self.start(); time.sleep(5)
if self.tap("maintain_ok.png"):
L.warning("Maintenance Time.")
return
if not self.tap("login.png", self._adb.get().TMP_PICTURE):
L.warning("Can't Tap : login.png")
return
time.sleep(5)
if self.tap("login_bonus.png"):
time.sleep(2); self.capture(self._adb.get().TMP_PICTURE)
if self.tap("return.png", self._adb.get().TMP_PICTURE):
time.sleep(2); self.capture(self._adb.get().TMP_PICTURE)
if self.tap("info_ok.png", self._adb.get().TMP_PICTURE):
time.sleep(2); self.capture(self._adb.get().TMP_PICTURE)
if self.tap("info_ok.png", self._adb.get().TMP_PICTURE):
time.sleep(2); self.capture(self._adb.get().TMP_PICTURE)
if not self.enable("login_check.png", self._adb.get().TMP_PICTURE):
time.sleep(2)
if self.enable("battle_menu.png", self._adb.get().TMP_PICTURE):
if self.quest_puyo_all():
L.info("Clear.")
elif self.tap("quest_ok.png", self._adb.get().TMP_PICTURE):
L.info("Quest Clear.")
L.warning("Can't Login.")
return False
return True
示例2: enable
def enable(self, reference, target=None):
L.debug("reference : %s " % reference)
if target == None:
self.adb().snapshot(self.adb().get().TMP_PICTURE, define.APP_TMP)
target = self.adb().get().TMP_PICTURE
return self.pic().is_pattern(
self.get_target(target), self.get_reference(reference))
示例3: battle_result
def battle_result(self):
time.sleep(5)
if self.enable("battle_result.png"):
L.debug("You Win.")
return True
else:
L.error("You Lose.")
return False
示例4: battle_guild_event
def battle_guild_event(self):
self.tap("special/battle_guild_event.png"); time.sleep(5)
self.tap("special/battle_guild_event_start.png"); time.sleep(5)
if self.enable("quest_selected.png"):
return True
else :
L.warning("Can't Guild Event Start.")
return False
示例5: battle_guild_event_result
def battle_guild_event_result(self):
time.sleep(5)
if self.enable("special/guild_event_result.png"):
L.debug("You Win. (Boss)")
return True
else:
L.error("You Lose.")
return False
示例6: quest_result
def quest_result(self):
time.sleep(5)
if self.enable("quest_result.png"):
L.info("You Win !")
return True
else:
L.error("You Lose.")
return False
示例7: support_guild_event
def support_guild_event(self):
self.tap("quest_supporter.png",
self._adb.get().TMP_PICTURE); time.sleep(2)
self.tap("quest_supporter_decide.png"); time.sleep(2)
self.tap("special/battle_guild_event_boss_start.png"); time.sleep(2)
time.sleep(20)
if self.enable("battle_menu.png"):
return True
else:
L.warning("Can't Guild Event Start.")
return False
示例8: tap
def tap(self, reference, target=None):
L.debug("reference : %s " % reference)
if target == None:
self.adb().snapshot(self.adb().get().TMP_PICTURE, define.APP_TMP)
target = self.adb().get().TMP_PICTURE
result = self.pic().find_pattern(
self.get_target(target), self.get_reference(reference))
if not result == None:
self.adb().tap(result.x + (result.width / 2), result.y + (result.height / 2))
return True
else:
return False
示例9: battle_puyo
def battle_puyo(self):
time.sleep(10)
while not self.enable("battle_ok.png"):
arr = self.get_info(self._adb.get().TMP_PICTURE)
array = self.puyo().strategy(arr)
xarray, yarray = self.action(array)
self.adb().swipe(xarray, yarray)
time.sleep(30)
if not self.tap("battle_ok.png", self._adb.get().TMP_PICTURE):
L.warning("Can't Tap : battle_ok.png")
return False
return True
示例10: quest_normal
def quest_normal(self):
self.tap("quest.png"); time.sleep(2)
if self.tap("quest_normal.png"):
time.sleep(2)
self.capture(self._adb.get().TMP_PICTURE)
self._tap(int(self._adb.get().PUYO_QUEST_NORMAL_WIDTH), int(self.adb().get().PUYO_QUEST_NORMAL_HEIGHT)); time.sleep(2)
self._tap(int(self._adb.get().PUYO_QUEST_NORMAL_WIDTH), int(self.adb().get().PUYO_QUEST_NORMAL_HEIGHT)); time.sleep(2)
if self.enable("quest_selected.png"):
return True
else :
L.warning("Can't Quest Start.")
return False
示例11: quest
def quest(self, category, level):
self.tap("quest.png"); time.sleep(2)
if self.tap("quest_normal.png"):
time.sleep(2)
self.capture(self._adb.get().TMP_PICTURE)
self.tap(category, self._adb.get().TMP_PICTURE); time.sleep(2)
self.tap(level); time.sleep(2)
if self.enable("quest_selected.png"):
return True
else :
L.warning("Can't Quest Start.")
return False
示例12: quest_result_first
def quest_result_first(self):
while not self.enable("quest_support_ok.png"):
self._tap(int(self._adb.get().WIDTH) / 2,
int(self._adb.get().HEIGHT) / 2)
time.sleep(5)
self.tap("quest_support_ok.png", self._adb.get().TMP_PICTURE); time.sleep(2)
self.capture(self._adb.get().TMP_PICTURE)
if self.enable("chance_boss.png"):
L.info("Emergency Boss !")
return True
else:
L.error("As always, It is peace.")
return False
示例13: support
def support(self):
if self.tap("quest_supporter_guild.png"):
time.sleep(2)
self.capture(self._adb.get().TMP_PICTURE)
self.tap("quest_supporter.png",
self._adb.get().TMP_PICTURE); time.sleep(2)
self.tap("quest_supporter_decide.png"); time.sleep(2)
self.tap("quest_start.png"); time.sleep(2)
time.sleep(30)
if self.enable("battle_menu.png"):
return True
else:
L.warning("Can't Quest Start.")
return False
示例14: battle
def battle(self, level):
self.tap("normal_battle.png"); time.sleep(2)
while not self.enable(level):
self.tap("battle_update.png", self._adb.get().TMP_PICTURE); time.sleep(2)
self.tap(level, self._adb.get().TMP_PICTURE); time.sleep(2)
self.tap("battle_decide.png"); time.sleep(2)
if self.enable("battle_return.png"):
self.tap("battle_return.png", self._adb.get().TMP_PICTURE)
L.warning("Not enough Magic Power.")
return False
self.tap("battle_start.png", self._adb.get().TMP_PICTURE); time.sleep(20)
if self.enable("battle_menu.png"): return True
else:
L.warning("Can't Battle Start.")
return False
示例15: quest_puyo_boss
def quest_puyo_boss(self):
s = system.System(self._adb); a = schezo.Player()
while not self.enable("quest_ok.png"):
if not self.enable("battle_menu.png", self._adb.get().TMP_PICTURE):
pass
else:
arr = s.get_info(self._adb.get().TMP_PICTURE)
array = a.strategy(arr)
xarray, yarray = s.action(array)
self._adb.swipe(xarray, yarray)
time.sleep(30)
if not self.tap("quest_ok.png", self._adb.get().TMP_PICTURE):
L.warning("Can't Tap : quest_ok.png")
return False
return True