@@ -290,16 +290,16 @@ def _deploy(self, context: Context, ctrl: Controller, action: Action, is_pc: boo
290290
291291 if is_pc :
292292 # PC: 左键拖拽
293- ctrl .post_touch_down (0 , avatar_x , avatar_y , 1 ).wait ()
293+ ctrl .post_touch_down (avatar_x , avatar_y , 0 , 1 ).wait ()
294294 time .sleep (0.05 )
295- ctrl .post_touch_move (0 , deploy_x , deploy_y , 1 ).wait ()
295+ ctrl .post_touch_move (deploy_x , deploy_y , 0 , 1 ).wait ()
296296 time .sleep (0.05 )
297297 ctrl .post_touch_up (0 ).wait ()
298298 else :
299299 # 模拟器: 右键拖拽(contact=1)
300- ctrl .post_touch_down (1 , avatar_x , avatar_y , 1 ).wait ()
300+ ctrl .post_touch_down (avatar_x , avatar_y , 1 , 1 ).wait ()
301301 time .sleep (0.1 )
302- ctrl .post_touch_move (1 , deploy_x , deploy_y , 1 ).wait ()
302+ ctrl .post_touch_move (deploy_x , deploy_y , 1 , 1 ).wait ()
303303 time .sleep (0.1 )
304304 ctrl .post_touch_up (1 ).wait ()
305305
@@ -333,9 +333,9 @@ def _set_direction(self, ctrl: Controller, action: Action, is_pc: bool) -> None:
333333 x2 = int (max (0 , min (1 , x + dx )) * 1280 )
334334 y2 = int (max (0 , min (1 , y + dy )) * 720 )
335335
336- ctrl .post_touch_down (0 , x1 , y1 , 1 ).wait ()
336+ ctrl .post_touch_down (x1 , y1 , 0 , 1 ).wait ()
337337 time .sleep (0.05 )
338- ctrl .post_touch_move (0 , x2 , y2 , 1 ).wait ()
338+ ctrl .post_touch_move (x2 , y2 , 0 , 1 ).wait ()
339339 time .sleep (0.05 )
340340 ctrl .post_touch_up (0 ).wait ()
341341 time .sleep (config .GENERAL_WAIT_MS / 1000 )
0 commit comments