Exemplo n.º 1
0
        private VoiceInteraction CreateVoiceInteraction(ResVoiceInteraction InInteractionCfg)
        {
            VoiceInteraction voiceInteraction = this.Factory.Create((int)InInteractionCfg.bTriggerType) as VoiceInteraction;

            DebugHelper.Assert(voiceInteraction != null, "Failed create Interaction for {0}:{1}", new object[]
            {
                InInteractionCfg.dwConfigID,
                InInteractionCfg.bTriggerType
            });
            return(voiceInteraction);
        }
Exemplo n.º 2
0
 private void LateUpdate()
 {
     if (!this.bActiveSys || MonoSingleton <Reconnection> .GetInstance().isProcessingRelayRecover)
     {
         return;
     }
     DictionaryView <int, ListView <VoiceInteraction> > .Enumerator enumerator = this.Interactions.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <int, ListView <VoiceInteraction> > current = enumerator.get_Current();
         ListView <VoiceInteraction> value = current.get_Value();
         int num  = -1;
         int num2 = 0;
         for (int i = 0; i < value.get_Count(); i++)
         {
             VoiceInteraction voiceInteraction = value.get_Item(i);
             if (voiceInteraction.isBeginTrigger && voiceInteraction.priority > num)
             {
                 num = voiceInteraction.priority;
                 num2++;
             }
         }
         if (num2 > 0)
         {
             float realtimeSinceStartup = Time.realtimeSinceStartup;
             for (int j = 0; j < value.get_Count(); j++)
             {
                 VoiceInteraction voiceInteraction2 = value.get_Item(j);
                 if (voiceInteraction2.isBeginTrigger && voiceInteraction2.priority == num)
                 {
                     voiceInteraction2.DoTrigger();
                 }
                 voiceInteraction2.FinishTrigger(realtimeSinceStartup);
             }
         }
     }
 }
Exemplo n.º 3
0
        private void FilterInteractionCfg(ResVoiceInteraction InInteractionCfg)
        {
            HashSet <int> inOwnerCamps = null;

            if (this.HeroStatInfo.TryGetValue((int)InInteractionCfg.dwGroupID, ref inOwnerCamps))
            {
                if (!this.CheckReceiver(InInteractionCfg, inOwnerCamps))
                {
                    return;
                }
                VoiceInteraction voiceInteraction = this.CreateVoiceInteraction(InInteractionCfg);
                if (voiceInteraction != null)
                {
                    voiceInteraction.Init(InInteractionCfg);
                    ListView <VoiceInteraction> listView = null;
                    if (!this.Interactions.TryGetValue(voiceInteraction.groupID, ref listView))
                    {
                        listView = new ListView <VoiceInteraction>();
                        this.Interactions.Add(voiceInteraction.groupID, listView);
                    }
                    listView.Add(voiceInteraction);
                }
            }
        }