Ejemplo n.º 1
0
 protected override void OnUpdate()
 {
     if (current != null)
     {
         current.Update();
     }
 }
Ejemplo n.º 2
0
        void Update()
        {
            this.lastFrameTime = DateTime.Now;
            while ((DateTime.Now - this.lastFrameTime).TotalMilliseconds < standardDeltaTime && this.execlusiveTaskList.Count > 0)
            {
                LinkedListNode <AbstractTask> last = execlusiveTaskList.Last;
                AbstractTask task = last.Value;
                task.onComplete += new Action(() => { execlusiveTaskList.Remove(last); });
                switch (task.status)
                {
                case eTaskStatus.Invalid:
                    execlusiveTaskList.Remove(last);
                    break;

                case eTaskStatus.WillDo:
                    task.Start();
                    break;

                case eTaskStatus.Doing:
                    task.Update();
                    break;
                }
                this.lastFrameTime = DateTime.Now;
            }
        }