예제 #1
0
		//
		// This method is invoked when the application has loaded and is ready to run. In this 
		// method you should instantiate the window, load the UI into it and then make the window
		// visible.
		//
		// You have 17 seconds to return from this method, or iOS will terminate your application.
		//
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			window = new UIWindow (UIScreen.MainScreen.Bounds);
			
			viewController = new MTGKTapperViewController ();
			window.RootViewController = viewController;
			window.MakeKeyAndVisible ();
			
			return true;
		}
예제 #2
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            viewController            = new MTGKTapperViewController();
            window.RootViewController = viewController;
            window.MakeKeyAndVisible();

            return(true);
        }
		public void ReportScore (long score, string category, MTGKTapperViewController controller)
		{
			var scoreReporter = new GKScore (category) {
				Value = score
			};
			scoreReporter.ReportScore (error => {
				if (error == null)
					ShowAlert("Score reported", "Score Reported successfully");
				else
					ShowAlert("Score Reported Failed", "Score Reported Failed");
				NSThread.SleepFor (1);
				controller.UpdateHighScore ();
			});
		}
		public void reportScore (long score, string category, MTGKTapperViewController controller)
		{
			GKScore scoreReporter = new GKScore (category);
			scoreReporter.Value = score;
			scoreReporter.ReportScore (new Action<NSError> ((error) => {
				if (error == null) {
					new UIAlertView ("Score reported", "Score Reported successfully", null, "OK", null).Show ();
				} else {
					new UIAlertView ("Score Reported Failed", "Score Reported Failed", null, "OK", null).Show ();
				}
				NSThread.SleepFor (1);
				controller.updateHighScore ();
			}));
		}
예제 #5
0
        public void reportScore(long score, string category, MTGKTapperViewController controller)
        {
            GKScore scoreReporter = new GKScore(category);

            scoreReporter.Value = score;
            scoreReporter.ReportScore(new Action <NSError> ((error) => {
                if (error == null)
                {
                    new UIAlertView("Score reported", "Score Reported successfully", null, "OK", null).Show();
                }
                else
                {
                    new UIAlertView("Score Reported Failed", "Score Reported Failed", null, "OK", null).Show();
                }
                NSThread.SleepFor(1);
                controller.updateHighScore();
            }));
        }
        public void ReportScore(long score, string category, MTGKTapperViewController controller)
        {
            var scoreReporter = new GKScore(category)
            {
                Value = score
            };

            scoreReporter.ReportScore(error => {
                if (error == null)
                {
                    ShowAlert("Score reported", "Score Reported successfully");
                }
                else
                {
                    ShowAlert("Score Reported Failed", "Score Reported Failed");
                }
                NSThread.SleepFor(1);
                controller.UpdateHighScore();
            });
        }