I got a line of code that is basicly a component from inside this main component, calling a method from that component while passing a parameter from this component. Here:
posCard place = DropZone.GetComponent<posCard>();
place.AddCardEnemy (card);
Now, how to delay this line, if Invoke only takes methods without params and Coroutine needs an IEnum?
Create a new coroutine method that waits a given amount of time and then calls the method:
public IEnumerator AddCardEnemyDelayed(float t, posCard place, Card card)
{
yield return new WaitForSeconds(t);
place.AddCardEnemy(card);
}
//This can then be called by:
StartCoroutine(AddCardEnemyDelayed(1f, place, card));