public void RegisterCreator(string name, GuideCommandCreator creator) { if (m_CreatorMap.ContainsKey(name)) { Log.W("Already Add Creator for :" + name); return; } m_CreatorMap.Add(name, creator); }
public AbstractGuideCommand Create(string name) { GuideCommandCreator creator = null; if (m_CreatorMap.TryGetValue(name, out creator)) { return(creator()); } return(null); }