예제 #1
0
 public override Boolean OnKeyMenu(GameObject go)
 {
     if (base.OnKeyMenu(go) && !_hidingHud && ButtonGroupState.ActiveGroup == CommandGroupButton)
     {
         if (ReadyQueue.Count > 1)
         {
             Int32 num = ReadyQueue[0];
             ReadyQueue.RemoveAt(0);
             ReadyQueue.Add(num);
             using (List <Int32> .Enumerator enumerator = ReadyQueue.GetEnumerator())
             {
                 while (enumerator.MoveNext())
                 {
                     Int32 current = enumerator.Current;
                     if (!InputFinishList.Contains(current) && !_unconsciousStateList.Contains(current) && current != CurrentPlayerIndex)
                     {
                         if (ReadyQueue.IndexOf(current) > 0)
                         {
                             ReadyQueue.Remove(current);
                             ReadyQueue.Insert(0, current);
                         }
                         SwitchPlayer(current);
                         break;
                     }
                 }
             }
         }
         else if (ReadyQueue.Count == 1)
         {
             SwitchPlayer(ReadyQueue[0]);
         }
     }
     return(true);
 }
예제 #2
0
    public void AddPlayerToReady(Int32 playerId)
    {
        if (_unconsciousStateList.Contains(playerId))
        {
            return;
        }

        ReadyQueue.Add(playerId);
        _partyDetail.GetCharacter(playerId).ATBBlink = true;
    }
예제 #3
0
        void HandleReadyPayload(DiscordApiData payload, DiscordApiData data)
        {
            int port = data.GetInteger("port").Value;
            int ssrc = data.GetInteger("ssrc").Value;

            IList <DiscordApiData> modesArray = data.GetArray("modes");

            string[] modes = new string[modesArray.Count];
            for (int i = 0; i < modes.Length; i++)
            {
                modes[i] = modesArray[i].ToString();
            }

            log.LogVerbose($"[Ready] ssrc = {ssrc}, port = {port}");

            // Notify
            ReadyQueue.Add(new VoiceReadyEventArgs(port, ssrc, modes));
        }