Beispiel #1
0
 public void showContinuePrompt(String text, ContinuePromptCallback callback)
 {
     if (ContinuePrompt != null)
     {
         ContinuePrompt.showPrompt(text, callback);
     }
     else
     {
         throw new Exception("No Continue Prompt defined.");
     }
 }
Beispiel #2
0
        private async Task OnAiContinuePrompt(ContinuePrompt x, Random r)
        {
            System.Diagnostics.Debug.WriteLine("OnAiContinuePrompt " + Thread.CurrentThread.ManagedThreadId);

            var continued = false;

            // 20% の確率でコンティニューさせとく
            if (r.NextDouble() < 0.2)
            {
                x.Confirm();
                continued = true;
            }

            System.Diagnostics.Debug.WriteLine($"continue : ({x.PlayerId}) {continued}");
        }
Beispiel #3
0
        private async Task OnContinuePrompt(ContinuePrompt x, Random r)
        {
            System.Diagnostics.Debug.WriteLine("OnContinuePrompt " + Thread.CurrentThread.ManagedThreadId);
            System.Diagnostics.Debug.WriteLine($"continue : ({x.PlayerId})");

            @continue.Visibility = Visibility.Visible;

            var res = await @continue.SelectAsync(CancellationToken.None);

            if (res)
            {
                x.Confirm();
            }

            @continue.Visibility = Visibility.Collapsed;
        }