Exemple #1
0
        public Mode2Methodes(int nrOfColors, int nrOfBlocks, int nrOfColumns, double rectSize, MainWindow win, Sounds player)
        {
            window  = win;
            _player = player;
            func    = new deladeFunktioner(window);
            window.timeClock.Content          = "";
            window.scoreFS.Content            = window.timeClock.Content;
            window.Points.Content             = "0";
            window.levelFS.Content            = "";
            window.lblLevelFullscreen.Content = "";
            window.lblTimeFullscreen.Content  = "Time";
            window.scoreFS.Content            = window.Points.Content;
            _numberOfColors = nrOfColors;
            _nrOfBlocks     = nrOfBlocks;
            _nrOfColumns    = nrOfColumns;
            _rectSize       = rectSize;
            window.classicGrid.Visibility = Visibility.Hidden;
            window.surivalGrid.Visibility = Visibility.Visible;
            _Timer          = new DispatcherTimer();
            _Timer.Interval = new TimeSpan(0, 0, 1);
            _Timer.Tick    += _Timer_Tick;
            window.fullscreenLeft.IsEnabled = true;
            window.fullscreenLeft.Opacity   = 1;
            window.fullscreenRight.Opacity  = 1;

            window.lblHighScoren.Content = "Survival";
            func.GetHighScore();
            if (window._inFullscreen)
            {
                func.GetHighScore();
                window.fullscreenRight.Visibility = Visibility.Visible;
                window.fullscreenLeft.Visibility  = Visibility.Visible;
            }
        }