Exemplo n.º 1
0
    public static void ChainExec(this MonoBehaviour b, int index = 0, params KeyValuePair <Action, float>[] actions)
    {
        if (actions.Length <= index)
        {
            return;
        }

        b.Wait(actions[index].Value, () => {
            actions[index].Key();
            b.ChainExec(index + 1, actions);
        });
    }