Exemplo n.º 1
0
        public LevelReader(ModelLevel ml)
        {
            levelModel = ml;

            //Read all maps and place their names in the array of maps
            readAllMaps();
        }
Exemplo n.º 2
0
 public Player(Board b, ModelLevel m, ModelScore s, MainWindow mw)
 {
     board = b;
     levelModel = m;
     scoreModel = s;
     windowMain = mw;
 }
Exemplo n.º 3
0
        public HighScoreView(ModelLevel level, HighScore highScore)
        {
            InitializeComponent();

            levelList.ItemsSource = level.Maps;
            this.highScore = highScore;
            levelList.SelectedIndex = 0;
            showScore(levelList.SelectedItem.ToString());
        }
        public MainWindow()
        {
            InitializeComponent();

            levelModel = new ModelLevel();
            levelReader = new LevelReader(levelModel);

            fillDropdown();
        }
Exemplo n.º 5
0
        public Board(ModelLevel ml)
        {
            levelModel = ml;

            var bc = new BrushConverter();
            this.Background = (Brush)bc.ConvertFrom("#FF5EC5F5");

            setGrid();
            drawMap();
            setBp();
        }
Exemplo n.º 6
0
        public MainWindow()
        {
            InitializeComponent();

            levelModel = new ModelLevel();
            levelReader = new LevelReader(levelModel);
            highScore = new HighScore();

            highScoreView = new HighScoreView(levelModel, highScore);
            mainGrid.Children.Add(highScoreView);
            highScoreView.Visibility = Visibility.Collapsed;

            fillDropdown();
        }
Exemplo n.º 7
0
        public LevelEditor(ModelLevel levelModel, LevelReader levelReader)
        {
            InitializeComponent();

            //Fill the list with existing levels
            this.levelModel = levelModel;
            this.levelReader = levelReader;
            mapsListBox.ItemsSource = levelModel.Maps;

            //Fill the list with level tiles.
            tilesListBox.Items.Add(new Wall());
            tilesListBox.Items.Add(new Floor());
            tilesListBox.Items.Add(new Target());
            tilesListBox.Items.Add(new Box());
            tilesListBox.Items.Add(new Forklift());
            tilesListBox.SelectedIndex = 0;

            initGrid();
        }
Exemplo n.º 8
0
        public InfoGrid(ModelLevel ml, ModelScore t)
        {
            levelModel = ml;
            scoreModel = t;

            this.Width = levelModel.InfoGridWidth;

            var bc = new BrushConverter();
            this.Background = (Brush)bc.ConvertFrom("#FF5EC5F5");

            createGrid();
            createTimer();

            clock = new System.Windows.Threading.DispatcherTimer();
            clock.Tick += new EventHandler(clock_Tick);
            clock.Interval = new TimeSpan(0, 0, 1);
            clock.Start();

            initAll();
        }