So i have this enemy and i want it to stop when i reaches its throwraidus how do i do that
void Update()
{
TargetFinder();
if (CurrentStones > 0)
{
if (myTarget == null)
currentTargetDistance = searchRadius;
else
Move(myTarget.transform);
{
if (currentTargetDistance < throwRaidus)
{
DoThrow();
}
}
}
↧