Пример #1
0
 public GameView(Game game)
 {
     InitializeComponent();
     Loaded += OnLoaded;
     _game = game;
     _isInGripInteraction = false;
 }
Пример #2
0
 private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
 {
     switch (_config.Level)
     {
         case 1:
             //napis + rysunek
             _game = new FirstLevelGame(_config);
             MainGrid.Children.Add(new GameView(_game));
             break;
         case 2:
             //napis
             _game = new SecondLevelGame(_config);
             MainGrid.Children.Add(new GameView(_game));
             break;
         case 3:
             //rysunek
             _game = new ThirdLevelGame(_config);
             MainGrid.Children.Add(new GameView(_game));
             break;
     }
 }