コード例 #1
0
        private bool LoadCall(Dsl.FunctionData callData)
        {
            m_LoadedOptArgs = new Dictionary <string, IStoryValue>();
            foreach (var pair in m_OptArgs)
            {
                StoryValue val = new StoryValue();
                val.InitFromDsl(pair.Value);
                m_LoadedOptArgs.Add(pair.Key, val);
            }
            m_LoadedArgs = new List <IStoryValue>();
            int num = callData.GetParamNum();

            for (int i = 0; i < num; ++i)
            {
                StoryValue val = new StoryValue();
                val.InitFromDsl(callData.GetParam(i));
                m_LoadedArgs.Add(val);
            }
            if (null == m_PrologueCommand)
            {
                m_PrologueCommand = new CompositePrologueCommandHelper(this);
            }
            if (null == m_EpilogueCommand)
            {
                m_EpilogueCommand = new CompositeEpilogueCommandHelper(this);
            }
            return(true);
        }
コード例 #2
0
        protected override void Load(Dsl.CallData callData)
        {
            m_LoadedOptArgs = new Dictionary <string, IStoryValue>();
            foreach (var pair in m_OptArgs)
            {
                StoryValue val = new StoryValue();
                val.InitFromDsl(pair.Value);
                m_LoadedOptArgs.Add(pair.Key, val);
            }
            m_LoadedArgs = new List <IStoryValue>();
            int num = callData.GetParamNum();

            for (int i = 0; i < num; ++i)
            {
                StoryValue val = new StoryValue();
                val.InitFromDsl(callData.GetParam(i));
                m_LoadedArgs.Add(val);
            }
            IsCompositeCommand = true;
            if (null == m_PrologueCommand)
            {
                m_PrologueCommand = new CompositePrologueCommandHelper(this);
            }
            if (null == m_EpilogueCommand)
            {
                m_EpilogueCommand = new CompositeEpilogueCommandHelper(this);
            }
        }