Beispiel #1
0
 public static ISingleTween <T> AllocateSingleTween <T>(EnvironmentType env) where T : struct
 {
     if (env != EnvironmentType.Ev0)
     {
         TweenSingleton.Initialized();
     }
     return(RecyclableObject.Allocate <SingleTween <T> >(env));
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
 protected override void OnLoad()
 {
     this.message.Publish(this, 0, RecyclableObject.Allocate <OnPanelLoadArg>(APP.envType));
 }
Beispiel #5
0
 /// <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));
 }