Beispiel #1
0
        internal WaitForGroup PoolNew(CoroutineGroup group, ulong skipTicks, uint skipFrames)
        {
            hasWaitForTicks  = false;
            hasWaitForFrames = false;

            Group = group;

            if (skipTicks > 0)
            {
                if (waitForTicks == null)
                {
                    waitForTicks = new WaitForTicks(skipTicks);
                }
                else
                {
                    waitForTicks.Ticks = skipTicks;
                }
                hasWaitForTicks = true;
            }
            if (skipFrames > 0)
            {
                if (waitForFrames == null)
                {
                    waitForFrames = new WaitForFrames(skipFrames);
                }
                else
                {
                    waitForFrames.Frames = skipFrames;
                }
                hasWaitForFrames = true;
            }

            return(this);
        }
Beispiel #2
0
        public WaitForGroup(CoroutineGroup group, ulong skipTicks = 0, uint skipFrames = 0)
        {
            Group = group;

            if (skipTicks > 0)
            {
                waitForTicks    = new WaitForTicks(skipTicks);
                hasWaitForTicks = true;
            }
            if (skipFrames > 0)
            {
                waitForFrames    = new WaitForFrames(skipFrames);
                hasWaitForFrames = true;
            }
        }