Method GoToArea
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
GoToArea(string)
Makes the hero navigate to a specific area in the game world.
public void GoToArea(string areaName)
Parameters
areaName
stringName of the target area to move to
Remarks
This method handles pathfinding between different areas using waypoints. The hero will automatically find the best path and follow waypoints to reach the destination.
if (CurrentArea?.Root.Name != "Stony Plains")
{
GoToArea("Stony Plains");
}
else
{
RunAroundInAreaAndAttack();
}
if (CurrentArea?.Root.Name != "Stony Plains")
{
GoToArea("Stony Plains");
}
else
{
if (Health < MaxHealth * 0.6f && HasHealthPotion())
{
DrinkHealthPotion();
RunAwayFromNearestEnemy();
}
else if (!AttackNearestEnemy())
{
RunAroundInArea();
}
}