There is a limited list of possible events (actions). When and in what sequence they will occur is not known in advance. An event has a certain execution time (3 seconds). If two or more events occur simultaneously (or within less than 3 seconds), then the next event would wait for the previous one to form, forming a conditional queue.
Those. If during the interval of less than 3 seconds, events of 1.3 occurred, and 7, then you need to start the event 1 to start, wait for 3 seconds, event 3, wait for 3 seconds, event 7
How can this be done at all? Coroutine doesn’t fit as I understood after the initialization of the korutin is "blocked" and cannot receive new variables (those if we initialized coroutine with events 1 and 3 and then (after initialization but before execution) event 7 occurred - then this very event 7 is lost or launch a new korutinu on top of already working)
All that comes to my mind is to have in Update () a dynamically cleared Array or List where actions will be recorded and from where they will be taken every 3 seconds for execution ... But this is somehow very cumbersome and I would not like to climb in Update () .
Is it possible to implement this task as it is easier?