Beispiel #1
0
        public static void InvokeTeardownActionsIfLastFrame(
            int index,
            int currentFrame,
            ref int lastFrameCount,
            out bool shouldComplete,
            KarassState karassState)
        {
            shouldComplete = false;

            if (IsLastFrame(currentFrame, karassState.Karass.FramesCollection[index], karassState.Karass))
            {
                TeardownKarass(index, ref lastFrameCount, out shouldComplete, karassState);
            }
            else
            {
                karassState.NextFrames.Add(karassState.Karass.FramesCollection[index][currentFrame]);
            }
        }
Beispiel #2
0
        private static void TeardownKarass(int index, ref int lastFrameCount, out bool allFramesTornDown, KarassState karassState)
        {
            karassState.Karass.Teardown(index);
            karassState.Complete[index] = true;
            // False will stop the Karass
            lastFrameCount++;
            // Abort if all frames have been false

            allFramesTornDown = lastFrameCount == karassState.Karass.FramesCollection.Count;
        }