Esempio n. 1
0
        public GamePage()
        {
            if (Instance != null)
            {
                throw new InvalidOperationException("There can be only one GamePage object!");
            }
            Instance = this;

            InitializeComponent();

            game = new Main();
            game.CInitialize();

            // Create a timer for this page
            timer = new GameTimer();
            timer.UpdateInterval = TimeSpan.FromTicks(333333);
            timer.Update        += OnUpdate;
            timer.Draw          += OnDraw;

            adView.Visibility = Visibility.Collapsed;
        }