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