Exemplo n.º 1
0
    private IEnumerator DelayedRemoveCoroutine()
    {
        while (GameControl.animationLock.counter > 1)
        {
            yield return(new WaitForSeconds(.01f));
        }

        AnimationCounter finishCounter = new AnimationCounter(deletingSet.Count);

        foreach (TreeControl treeControl in deletingSet)
        {
            treeControl.Remove(finishCounter);
        }

        while (finishCounter.counter > 0)
        {
            yield return(new WaitForSeconds(.01f));
        }
        GameControl.animationLock.Dec();
    }
Exemplo n.º 2
0
 public void Remove(AnimationCounter counter)
 {
     deleteCounter = counter;
     isDeleting    = true;
 }