I recommend not using a for-loop, but instead use InvokeRepeating.
Example:
int nCardsToPush = 5;
void Start () {
InvokeRepeating("PopCard", 0, 0.5f);
}
void PopCard () {
if (nCardsToPush > 0) {
enemy.Push (cardDeckEnemy.Pop ());
nCardsToPush--;
} else {
CancelInvoke();
}
}
↧