op
This commit is contained in:
@@ -32,37 +32,37 @@ class _Action:
|
||||
# 上滑
|
||||
def swipe_up(self, dist, speed):
|
||||
|
||||
x1 = int(self.scr_w * 0.25) + int(random.uniform(-10, 10))
|
||||
x2 = x1 + int(random.uniform(-10, 10))
|
||||
y1 = int(self.scr_w * 0.7) + int(random.uniform(-10, 10))
|
||||
y2 = y1 - dist + int(random.uniform(-10, 10))
|
||||
x1 = int(self.scr_w * 0.45) + int(random.uniform(-20, 20))
|
||||
y1 = int(self.scr_h * 0.7) + int(random.uniform(-20, 20))
|
||||
x2 = x1 + int(random.uniform(-20, 20))
|
||||
y2 = y1 - dist + int(random.uniform(-20, 20))
|
||||
time = speed - int(random.uniform(-10, 10))
|
||||
self.operator.swipe(x1, y1, x2, y2, time)
|
||||
|
||||
# 下滑
|
||||
def swipe_down(self, dist, speed):
|
||||
x1 = int(self.scr_w * 0.75) + int(random.uniform(-10, 10))
|
||||
x2 = x1 + int(random.uniform(-10, 10))
|
||||
y1 = int(self.scr_w * 0.5) + int(random.uniform(-10, 10))
|
||||
y2 = y1 + dist + int(random.uniform(-10, 10))
|
||||
x1 = int(self.scr_w * 0.45) + int(random.uniform(-20, 20))
|
||||
y1 = int(self.scr_h * 0.6) + int(random.uniform(-20, 20))
|
||||
x2 = x1 + int(random.uniform(-20, 20))
|
||||
y2 = y1 + dist + int(random.uniform(-20, 20))
|
||||
time = speed + int(random.uniform(-10, 10))
|
||||
self.operator.swipe(x1, y1, x2, y2, time)
|
||||
|
||||
# 左滑
|
||||
def swipe_left(self, dist, speed):
|
||||
x1 = int(self.scr_w * 0.7) + int(random.uniform(-10, 10))
|
||||
x2 = x1 - dist + int(random.uniform(-10, 10))
|
||||
y1 = int(self.scr_w * 0.75) + int(random.uniform(-10, 10))
|
||||
y2 = y1 + int(random.uniform(-10, 10))
|
||||
x1 = int(self.scr_w * 0.7) + int(random.uniform(-20, 20))
|
||||
y1 = int(self.scr_h * 0.75) + int(random.uniform(-20, 20))
|
||||
x2 = x1 - dist + int(random.uniform(-20, 20))
|
||||
y2 = y1 + int(random.uniform(-20, 20))
|
||||
time = speed + int(random.uniform(-10, 10))
|
||||
self.operator.swipe(x1, y1, x2, y2, time)
|
||||
|
||||
# 右滑
|
||||
def swipe_right(self, dist, speed):
|
||||
x1 = int(self.scr_w * 0.25) + int(random.uniform(-10, 10))
|
||||
x2 = x1 + dist + int(random.uniform(-10, 10))
|
||||
y1 = int(self.scr_w * 0.75) + int(random.uniform(-10, 10))
|
||||
y2 = y1 + int(random.uniform(-10, 10))
|
||||
x1 = int(self.scr_w * 0.3) + int(random.uniform(-20, 20))
|
||||
y1 = int(self.scr_h * 0.75) + int(random.uniform(-20, 20))
|
||||
x2 = x1 + dist + int(random.uniform(-20, 20))
|
||||
y2 = y1 + int(random.uniform(-20, 20))
|
||||
time = speed + int(random.uniform(-10, 10))
|
||||
self.operator.swipe(x1, y1, x2, y2, time)
|
||||
|
||||
|
Reference in New Issue
Block a user