Ejemplo n.º 1
0
 protected override bool ExecCommand(StoryInstance instance, long delta)
 {
     for (int i = 0; i < m_MsgIds.Count; i++)
     {
         instance.PauseMessageHandler(m_MsgIds[i].Value, false);
     }
     return(false);
 }
Ejemplo n.º 2
0
        protected override bool ExecCommand(StoryInstance instance, long delta)
        {
            string _namespace = instance.Namespace;

            if (string.IsNullOrEmpty(_namespace))
            {
                for (int i = 0; i < m_MsgIds.Count; i++)
                {
                    instance.PauseMessageHandler(m_MsgIds[i].Value, true);
                }
            }
            else
            {
                for (int i = 0; i < m_MsgIds.Count; i++)
                {
                    instance.PauseMessageHandler(string.Format("{0}:{1}", _namespace, m_MsgIds[i].Value), true);
                }
            }
            return(false);
        }
        public void PauseMessageHandler(string msgId, bool pause)
        {
            int ct = m_StoryLogicInfos.Count;

            for (int ix = ct - 1; ix >= 0; --ix)
            {
                StoryInstance info = m_StoryLogicInfos[ix];
                info.PauseMessageHandler(msgId, pause);
            }
            foreach (var pair in m_AiStoryInstancePool)
            {
                var infos = pair.Value;
                int aiCt  = infos.Count;
                for (int ix = aiCt - 1; ix >= 0; --ix)
                {
                    if (infos[ix].m_IsUsed && null != infos[ix].m_StoryInstance)
                    {
                        infos[ix].m_StoryInstance.PauseMessageHandler(msgId, pause);
                    }
                }
            }
        }
Ejemplo n.º 4
0
 protected override bool ExecCommand(StoryInstance instance, long delta)
 {
     string _namespace = instance.Namespace;
     if (string.IsNullOrEmpty(_namespace)) {
         for (int i = 0; i < m_MsgIds.Count; i++) {
             instance.PauseMessageHandler(m_MsgIds[i].Value, false);
         }
     } else {
         for (int i = 0; i < m_MsgIds.Count; i++) {
             instance.PauseMessageHandler(string.Format("{0}:{1}", _namespace, m_MsgIds[i].Value), false);
         }
     }
     return false;
 }
Ejemplo n.º 5
0
 protected override bool ExecCommand(StoryInstance instance, long delta)
 {
     for (int i = 0; i < m_MsgIds.Count; i++) {
         instance.PauseMessageHandler(m_MsgIds[i].Value, false);
     }
     return false;
 }