public void AddOneHttpCallBack(Action <SnapRpcDataVO> action, SnapRpcDataVO data) { SnapHttpCallBack http = new SnapHttpCallBack(); http.actionCallBack = action; http.dataVO = data; callBackList.Add(http); }
public void update() { double current_time = SystemTime.timeSinceLaunch; if (current_time - last_time < 0.15) { return; } last_time = current_time; if (callBackList.Count > 0) { SnapHttpCallBack callBack = callBackList[0]; callBackList.RemoveAt(0); if (callBack != null) { callBack.SendAction(); } } }