Exemplo n.º 1
0
 public override void Draw(CanvasAnimatedDrawEventArgs args)
 {
     BackgroundWords.Draw(args);
     if (str != null)
     {
         str.DrawMirrored(args);
     }
 }
Exemplo n.º 2
0
        public override void Update(CanvasAnimatedUpdateEventArgs args)
        {
            if (BackgroundWords.Count < 40)
            {
                BackgroundWords.EnqueueRandomWords(40);
            }

            BackgroundWords.Update(args);
            if (str != null)
            {
                str.Update(args);
            }
        }
        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.º 5
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;
                    }
                }
            }
        }
Exemplo n.º 6
0
        private static void NextScreen()
        {
            switch (_currentScreen)
            {
            case SCREEN_TYPE.INTRO:
                _currentScreen = SCREEN_TYPE.GAME;
                break;

            case SCREEN_TYPE.GAME:
                _currentScreen = SCREEN_TYPE.WINNER;
                break;

            case SCREEN_TYPE.WINNER:
                _currentScreen = SCREEN_TYPE.INTRO;
                break;
            }

            BackgroundWords.Clear();
            if (CurrentScreen != null)
            {
                CurrentScreen.Reset();
            }
        }
 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);
 }