Skip to content

Commit

Permalink
last felling don't exit game
Browse files Browse the repository at this point in the history
  • Loading branch information
huiyadanli committed Dec 24, 2023
1 parent c6d2887 commit da40679
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions BetterGenshinImpact/GameTask/AutoWood/AutoWoodTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void Start(WoodTaskParam taskParam)
break;
}

Felling(taskParam);
Felling(taskParam, i + 1 == taskParam.WoodRoundNum);
VisionContext.Instance().DrawContent.ClearAll();
Sleep(500, taskParam.Cts);
}
Expand All @@ -97,11 +97,16 @@ public void Start(WoodTaskParam taskParam)
}
}

private void Felling(WoodTaskParam taskParam)
private void Felling(WoodTaskParam taskParam, bool isLast = false)
{
// 1. 按 z 触发「王树瑞佑」
PressZ(taskParam);

if (isLast)
{
return;
}

// 2. 按下 ESC 打开菜单 并退出游戏
PressEsc(taskParam);

Expand Down Expand Up @@ -243,4 +248,4 @@ private void EnterGame(WoodTaskParam taskParam)
throw new RetryException("未检测进入游戏界面");
}
}
}
}

0 comments on commit da40679

Please sign in to comment.