public virtual void Combine(IMsgFactory fact) { if (fact.groupId != groupId) { Debug.LogWarning("<color=orange>[Warning]</color>---" + "groupId不同,不能合并"); return; } MsgFactory_Manual factory = fact as MsgFactory_Manual; if (factory == null) { Debug.LogWarning("<color=orange>[Warning]</color>---" + "MsgFactory类型非法,合并失败"); return; } ToolsNet.CombineDict <CMD_Command, CreateInstance_req>(_dictCreateReq, factory._dictCreateReq, false); ToolsNet.CombineDict <CMD_Command, CreateInstance_respNtf>(_dictCreateRespNtf, factory._dictCreateRespNtf, false); }
public virtual void UnCombine(IMsgFactory fact) { if (fact.groupId != groupId) { Debug.LogWarning("<color=orange>[Warning]</color>---" + "groupId不同,不能取消合并"); return; } MsgFactory_Manual factory = fact as MsgFactory_Manual; if (factory == null) { Debug.LogWarning("<color=orange>[Warning]</color>---" + "MsgFactory类型非法,取消合并失败"); return; } foreach (var keyItem in factory._dictCreateReq.Keys) { this._dictCreateReq.Remove(keyItem); } foreach (var keyItem in factory._dictCreateRespNtf.Keys) { this._dictCreateRespNtf.Remove(keyItem); } }