Beispiel #1
0
    IEnumerator WaitAndMine(int time)
    {
        yield return(new WaitForSeconds(time + 0.2F));

        if (distanceToTarget(mineObjective.gameObject) < mineObjective.mineDistance)
        {
            mineObjective.Mine(3, true);
        }
    }
Beispiel #2
0
 void MineResource(ResourceParent targetResource, bool waited)
 {
     /*int ja = */ targetResource.Mine(3, waited);
     hasToMine = false;
     StartCoroutine(WaitAndMine(waitTime));
 }