示例#1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            // Create our OpenGL view, and display it
            Game1.Activity = this;
            var g = new Game1 ();
            SetContentView (g.Window);
            g.Run ();
        }
示例#2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            // Create our OpenGL view, and display it
            Game1.Activity = this;
            var g = new Game1 ();

            g.NotifyScore = (s) => {
                var builder = new AmazonNotification.Builder (ApplicationContext);
                builder.SetSmallIcon (Resource.Drawable.IcPopupReminder);
                builder.SetContentTitle ("New High Score!!!");
                builder.SetContentText (string.Format("{0}",s));
                builder.SetType (BuilderType.Info);

                var notificationManager = GetSystemService (Context.NotificationService)
                    .JavaCast <AmazonNotificationManager> ();

                notificationManager.Notify (1, builder.Build ());
            };

            SetContentView (g.Window);
            g.Run ();
        }