Esempio n. 1
0
    private void CheckNextEffects()
    {
        if (effects_cluster.Count > 0)
        {
            List <UIEffect> curr_active_cluster = effects_cluster[0];

            bool finished = true;

            for (int i = 0; i < curr_active_cluster.Count; ++i)
            {
                UIEffect curr_effect = curr_active_cluster[i];

                if (!curr_effect.GetStarted())
                {
                    curr_effect.Start();
                    curr_effect.SetStarted();
                }

                if (!curr_effect.GetFinished())
                {
                    finished = false;
                    break;
                }
            }

            if (finished)
            {
                if (effects_cluster.Count > 0)
                {
                    effects_cluster.RemoveAt(0);

                    if (effects_cluster.Count > 0)
                    {
                        List <UIEffect> new_active_cluster = effects_cluster[0];

                        for (int i = 0; i < new_active_cluster.Count; ++i)
                        {
                            UIEffect curr_effect = new_active_cluster[i];

                            curr_effect.Start();
                            curr_effect.SetStarted();
                        }
                    }
                }
            }
        }
    }