예제 #1
0
        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);
        }
예제 #2
0
        public AbstractGuideCommand Create(string name)
        {
            GuideCommandCreator creator = null;

            if (m_CreatorMap.TryGetValue(name, out creator))
            {
                return(creator());
            }

            return(null);
        }