Esempio n. 1
0
        public void SelectTile(TilesViewModel tile)
        {
            tile.TileView();

            if (FirstTileSelected == null)
            {
                FirstTileSelected = tile;
            }
            else if (SecondTileSelected == null)
            {
                SecondTileSelected = tile;
                UnmatchedHide();
            }

            //Sound FX flip Card
            OnPropertyChanged("TilesActive");
        }
Esempio n. 2
0
        public void CreateTiles(string imagePath)
        {
            TileCards = new ObservableCollection <TilesViewModel>();
            var models = GetModelsFrom(imagePath);

            for (int i = 0; i < 6; i++)
            {
                var newTile      = new TilesViewModel(models[i]);
                var newMatchTile = new TilesViewModel(models[i]);
                TileCards.Add(newTile);
                TileCards.Add(newMatchTile);
                newTile.TileView();
                newMatchTile.TileView();
            }

            TileShuffle();
            OnPropertyChanged("TileCards");
        }
Esempio n. 3
0
 private void ClearSelectedTiles()
 {
     FirstTileSelected  = null;
     SecondTileSelected = null;
     Select             = false;
 }