private void Update() { switch (ControllerState) { case GameController.State.Enter: if (step == 0) { p.PaddleStatus = Paddle.Status.Enabled; if (countdown == null) { countdown = CountDown.New(); countdown.Begin( () => { canContinue = true; } ); } step++; } if (step == 1) { if (canContinue) { step = 0; levelTimer.SetStartOffset(); ControllerState = GameController.State.Execute; } } return; case GameController.State.Execute: if (step == 0) { p.PaddleState = Paddle.State.Serve; step++; return; } if (step == 1) { levelTimer.PrintTime(); return; } return; case GameController.State.Exit: return; default: return; } }
private void StartCooldown() { _playingMusic = false; SolidColorBrush brush = new SolidColorBrush(Colors.Blue); MyProgressBar.Foreground = brush; InstructionTextBlock.Text = string.Format("Get ready for round {0}...", _round + 1); CountDown.Begin(); }
//Once preperation is done you're then timed to guess song private void CountdownStr() { playmusic = true; SolidColorBrush brush = new SolidColorBrush(Colors.Green); MyProgressBar.Foreground = brush; InstructionTextBlock.Text = "GO GO GO!"; InstructionTextBlock.Foreground = brush; CountDown.Begin(); }
//Bar on top of the page private void StartCooldown() { playmusic = false; SolidColorBrush brush = new SolidColorBrush(Colors.Red); MyProgressBar.Foreground = brush; InstructionTextBlock.Text = string.Format("Please prepare for round {0} ...", round + 1); InstructionTextBlock.Foreground = brush; CountDown.Begin(); }
private void StartCountdown() { _playingMusic = true; SolidColorBrush brush = new SolidColorBrush(Colors.Red); MyProgressBar.Foreground = brush; InstructionTextBlock.Text = "GO!"; InstructionTextBlock.Foreground = brush; CountDown.Begin(); }
private void StartCountdown() { SkipCooldown.Visibility = Visibility.Collapsed; StopCooldown.Visibility = Visibility.Collapsed; _playingMusic = true; SolidColorBrush brush = new SolidColorBrush(Colors.Red); MyProgressBar.Foreground = brush; InstructionTextBlock.Text = "GO!"; InstructionTextBlock.Foreground = brush; CountDown.Begin(); }
private void StartCooldown() { MyMediaElement.Visibility = Visibility.Visible; SkipCooldown.Visibility = Visibility.Visible; StopCooldown.Visibility = Visibility.Visible; _playingMusic = false; SolidColorBrush brush = new SolidColorBrush(Colors.Blue); MyProgressBar.Foreground = brush; InstructionTextBlock.Text = string.Format("Get ready for round {0} ...", _round + 1); InstructionTextBlock.Foreground = brush; CountDown.Begin(); }
private async Task PrepareNewGameAsync(List <StorageFile> allSongs) { Songs.Clear(); LoadingProgressRing.IsActive = true; InitialGameState(); //2. Choose random songs from library var songsToPlay = await PickRandomSongsAsync(allSongs); //3. Pluck off meta data from selected songs await PopulateSongListAsync(songsToPlay); await ChooseCurrentSongAsync(); CountDown.Begin(); LoadingProgressRing.IsActive = false; }
private void StartCountdown() { _playingMusic = true; InstructionTextBlock.Text = "Playing Music...♪"; CountDown.Begin(); }