public static ISingleTween <T> AllocateSingleTween <T>(EnvironmentType env) where T : struct { if (env != EnvironmentType.Ev0) { TweenSingleton.Initialized(); } return(RecyclableObject.Allocate <SingleTween <T> >(env)); }
private static T Allocate <T>(EnvironmentType envType) where T : ActionNode { T t = RecyclableObject.Allocate <T>(envType); while (t.disposed) { t = RecyclableObject.Allocate <T>(envType); } return(t); }
private static T Allocate <T>(FrameworkEnvironment env) where T : ActionNode { T t = RecyclableObject.Allocate <T>(env); while (t.disposed) { t = RecyclableObject.Allocate <T>(env); } return(t); }
protected override void OnLoad() { this.message.Publish(this, 0, RecyclableObject.Allocate <OnPanelLoadArg>(APP.envType)); }
/// <summary> /// 跑一个线程任务 /// </summary> /// <param name="task"></param> /// <param name="callback"></param> public void RunTask(Action task, Action callback) { lock (CacheArgs) CacheArgs.Enqueue(RecyclableObject.Allocate <ThreadArgs>(this.container.env).Config(task, callback, this)); }