Exemplo n.º 1
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            if (!GameData.Current.FinishedTraining)
            {
                GameManager.Current.CheckTrainingFinished().ConfigureAwait(true);
                if (GameData.Current.FinishedTraining)
                {
                    var trainingPage = PresentedViewController;

                    Pages = new List <UIViewController> {
                        CompanyVC, TapToPlayVC
                    };
                    DataSource = new StartPageDataSource(Pages, FeedbackVC, GameManager.Current, Storyboard);

                    // Clear previous page
                    GotoPage(0);
                    GotoPage(1);
                    GotoPage(2);
                }
            }

            /*
             *          if (GameData.Current.GamesPlayed >= GameData.SHOW_FEEDBACK_AFTER)
             *                  mSectionsPagerAdapter?.ShowFeedback();
             */
        }
Exemplo n.º 2
0
        public override async void ViewDidLoad()
        {
            base.ViewDidLoad();

            ResourceUtil.Impl = new Engine.ResourceUtil();
            GameManager.Current.LoadKnownGamePacks();
            await GameData.Current.LoadData();

            CompanyVC   = Storyboard.InstantiateViewController("CompanyVC");
            TapToPlayVC = Storyboard.InstantiateViewController("TapToPlayVC") as TapToPlayViewController;
            FeedbackVC  = Storyboard.InstantiateViewController("FeedbackVC") as FeedbackViewController;

            Pages = new List <UIViewController> {
                CompanyVC, TapToPlayVC
            };
            DataSource = new StartPageDataSource(Pages, FeedbackVC, GameManager.Current, Storyboard);

            GotoPage(1);

            TapToPlayVC.Tapped += (sender, e) =>
            {
                GotoPage(2);
            };
        }