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); }
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); }