예제 #1
0
        public static TweenActionDriver <TState> Prepare(TState state, TweenOptions options)
        {
            TweenActionDriver <TState> driver = _pool.Request();

            driver.Prepare(state, options, _tokenAllocator.Next());
            Trace.TraceAllocation(driver);
            return(driver);
        }
예제 #2
0
        public static TweenSource Request(ITweenActionDriver driver)
        {
            TweenSource source = null;

            if (_pool.Count > 0)
            {
                source = _pool.Pop();
            }
            else
            {
                source = new TweenSource();
            }
            source.Initialize(driver, _tokenAllocator.Next());
            return(source);
        }