Ejemplo n.º 1
0
        /// <summary>
        /// Talk、Whisperを追加登録する
        /// </summary>
        /// <param name="gameInfo"></param>
        private void ApendTalkList(GameInfo gameInfo)
        {
            LatestTalkList.Clear();

            for (int i = TalkList.Count; i < gameInfo.TalkList.Count; i++)
            {
                ExtTalk newTalk = new ExtTalk(gameInfo.TalkList[i]);
                TalkList.Add(newTalk);
                LatestTalkList.Add(newTalk);
            }

            for (int i = WhisperList.Count; i < gameInfo.WhisperList.Count; i++)
            {
                WhisperList.Add(new ExtTalk(gameInfo.WhisperList[i]));
            }

            // 発言で宣言した投票先を取得
            SaidVote = new VoteAnalyzer(DayTimeAliveAgent, TalkList, Topic.VOTE);
        }
Ejemplo n.º 2
0
        private void EmitListWhisper()
        {
            var ccs = new CancellationTokenSource();

            ccs.CancelAfter(5000);
            var whisperList = new WhisperList
            {
                Config = new WhisperConfig {
                    Label = "C# Whisper"
                },
                Elements = new Dictionary <string, ListBase>
                {
                    ["Nickname"] = new ListPair {
                        Label = "Nickname", Order = 1, Value = "Old Greg"
                    },
                    ["Link"] = new ListLink {
                        Align = ListAlign.Center, Href = "https://isitchristmas.com/", Order = 2, Text = "Is it Christmas?"
                    }
                },
            };

            _services.Whisper.ListAsync(whisperList, ccs.Token);
            Logger.Info($"Sent List Whisper");
        }
Ejemplo n.º 3
0
 public void AddWhisper(Agent agent, Talk whisper)
 {
     WhisperList.Add(whisper);
 }