void StateMsgUpdate() { do { LinkedListNode <AutoUpdateMsgNode> node; lock (m_Lock) { node = m_StateMsgList.First; if (node == null) { break; } m_StateMsgList.RemoveFirst(); } if (node.Value.autoUpdateState >= 0) { Release(); AutoUpdateState state = (AutoUpdateState)node.Value.autoUpdateState; if (m_StateMgr.ChangeState(state)) { CallStateChanged(state); } } else if (node.Value.errType >= 0) { AutoUpdateErrorType errType = (AutoUpdateErrorType)node.Value.errType; if (OnError != null) { OnError(errType, node.Value.errStatus); } } } while (true); }
private void AddErrMsg(AutoUpdateErrorType errType, int errStatus) { AutoUpdateMsgNode node = AutoUpdateMsgNode.Create(); node.errType = (int)errType; node.errStatus = errStatus; lock (m_Lock) { m_StateMsgList.AddLast(node); } }
internal void Error(AutoUpdateErrorType errType, int status) { AddErrMsg(errType, status); }
void OnAutoUpdateError(AutoUpdateErrorType errType, int code) { Debug.LogFormat("OnUpdateError: errType {0:D} code {0:D}", (int)errType, code); }
internal void Error(AutoUpdateErrorType errType, int status) { }