UnicornClicker.GameViewModel.StartNewGame C# (CSharp) Method

StartNewGame() public method

public StartNewGame ( ) : void
return void
        public void StartNewGame()
        {
            ClickCount = 0;
            SecondsPlayed = -3;
            GameControlsVisibility = Visibility.Collapsed;

            _timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1) };
            _timer.Tick += HandleTimerTick;
            _timer.Start();
        }

Usage Example

Example #1
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     _game.StartNewGame();
 }
All Usage Examples Of UnicornClicker.GameViewModel::StartNewGame