public Action GetAction() { Action result = null; if (this.qTask.Count > 0) { LoginTask.TaskInfo taskInfo = this.qTask.Peek(); if (taskInfo.dep == null || taskInfo.dep.Count == 0) { result = taskInfo.func; this.qTask.Dequeue(); } } return(result); }
public void OnAction(ELoginAction e) { if (this.qTask.Count > 0) { for (int i = 0; i < this.qTask.Count; i++) { LoginTask.TaskInfo taskInfo = this.qTask.ElementAt(i); if (taskInfo.dep != null && taskInfo.dep.Count > 0) { int num = taskInfo.dep.IndexOf(e); if (num != -1) { taskInfo.dep.RemoveAt(num); } } } } }