Exemplo n.º 1
0
        public PlayModeViewModel(ShellViewModel shellViewModel, GameOptionsModel gameOptions)
        {
            this.shellViewModel = shellViewModel;
            this.gameOptions    = gameOptions;

            headPosition = startPoint;

            lastDirection = Direction.Right;
            nextStep.X    = stepSize;

            tickTimer.Tick    += new EventHandler(OnTimerTick);
            tickTimer.Interval = new TimeSpan((int)gameOptions.Difficulty);
            tickTimer.Start();
        }
Exemplo n.º 2
0
 public void ChangeToPlayMode(GameOptionsModel gameOptions)
 {
     playModeViewModel = new PlayModeViewModel(this, gameOptions);
     ActivateItem(playModeViewModel);
 }