So I have this enemy there is going to throw stone but I have that one problem that it throws all of it stone at once and I want it to wait between each throw can someone help me?
{
TargetFinder();
if (myTarget == null)
currentTargetDistance = searchRadius;
else
Move(myTarget.transform);
{
if (currentStones > 0)
{
if (currentTargetDistance <= throwRadius)
{
DoThrow();
MoveSpeed = 0f;
}
}
void DoThrow()
{
myTarget = null;
currentTargetDistance = searchRadius;
Instantiate(Stone, new Vector3(), Quaternion.identity);
currentStones--;
}
}