/// <summary> /// 创建实际tween对象,但不执行 /// </summary> public TweenBase <T> createTween(T start, T end, int delay, Action <T> func, Action overFunc = null, int ease = EaseType.Linear) { TweenBase <T> tween = _pool.getOne(); int index = ++_indexMaker; tween.init(index, getValueFunc, start, end, delay, func, overFunc, ease); _dic.put(index, tween); return(tween); }
public TweenFactoryBase() { _pool = new ObjectPool <TweenBase <T> >(() => { TweenBase <T> tween = new TweenBase <T>(); tween.setFactory(this); return(tween); }); _pool.setEnable(CommonSetting.viewUsePool); }
public void release(TweenBase <T> tween) { _pool.back(tween); }