Exemplo n.º 1
0
 public override void Transition()
 {
     if (!_transitioning)
     {
         _transitioning = true;
         PuzzleCollection.NewGame();
         Music.Play(Music.Whoosh);
         str.Solve(PalindromePuzzle.SOLVE_FADEOUT_TYPE.FLYOUT);
     }
 }
        public override void Update(CanvasAnimatedUpdateEventArgs args)
        {
            if (BackgroundWords.Count < 50)
            {
                BackgroundWords.EnqueueWinningWords(50);
            }

            BackgroundWords.Update(args);
            if (str != null)
            {
                str.Update(args);
            }
            PuzzleCollection.Update(args);
            SolveIcons.Update(args);
        }
        private async void CanvasMain_CreateResources(CanvasAnimatedControl sender, Microsoft.Graphics.Canvas.UI.CanvasCreateResourcesEventArgs args)
        {
            Statics.CanvasWidth  = canvasMain.ActualWidth;
            Statics.CanvasHeight = canvasMain.ActualHeight;

            mediaSimple.MediaPlayer.RealTimePlayback = true;
            mediaSimple.MediaPlayer.IsLoopingEnabled = true;

            await Images.Initialize(sender.Device);

            PuzzleCollection.Initialize(sender.Device);
            await Speech.Initialize();

            BackgroundWords.Initialize(sender.Device);
            Music.Initialize();
            Screens.Initialize(sender.Device);
        }
Exemplo n.º 4
0
        private static void ContinuousRecognitionSession_ResultGenerated(SpeechContinuousRecognitionSession sender, SpeechContinuousRecognitionResultGeneratedEventArgs args)
        {
            Debugging.AddTimedString("Matched (" + args.Result.Confidence.ToString() + "): " + args.Result.Text);
            for (int i = 0; i < 5; i++)
            {
                BackgroundWords.Enqueue(args.Result.Text);
            }

            if (PuzzleCollection.CurrentPuzzle != null)
            {
                string[] words = args.Result.Text.Split(" ".ToCharArray());
                foreach (string word in words)
                {
                    if (PuzzleCollection.CurrentPuzzle.IsSolution(word))
                    {
                        PuzzleCollection.SolveCurrentPuzzle();
                        break;
                    }
                }
            }
        }
 public override void Transition()
 {
     PuzzleCollection.SolveCurrentPuzzle();
 }
 public override void Update(CanvasAnimatedUpdateEventArgs args)
 {
     PuzzleCollection.Update(args);
     BackgroundWords.Update(args);
     SolveIcons.Update(args);
 }
 public override void Draw(CanvasAnimatedDrawEventArgs args)
 {
     PuzzleCollection.Draw(args);
     BackgroundWords.Draw(args);
     SolveIcons.Draw(args);
 }