/// <summary> /// Causes all blocks to disappear /// </summary> /// <returns>The clear board transition.</returns> U9Transition CreateClearBoardTransition() { List <U9Transition> transitions = new List <U9Transition> (); for (int i = 0, ni = gridSize; i < ni; i++) { for (int j = 0, nj = gridSize; j < nj; j++) { Block b = blocks [i, j]; if (b) { transitions.Add(b.CreateDisappearTransition(0)); } } } // Randomises the order of the disappear transitions to make it more pretty! List <U9Transition> randomisedTransitions = GetRandomSubset(transitions, transitions.Count); float staggerTime = 0.025f; // 0.025f; return(U9T.Stagger(staggerTime, randomisedTransitions.ToArray())); }