Exemple #1
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            app.SetStatusBarHidden(true, true);

            // configure our Flurry and SGAgent bits
            var flurryKey = "FLURRYKEY";
            // these can be useful if you have this info
            // FA.Flurry.SetAppVersion("app_version");
            // FA.Flurry.SetUserID("user_id");
            Flurry flurry = new IOSFlurry();

            try {
                Console.WriteLine("Initializing Flurry [vers=" + FA.Flurry.GetFlurryAgentVersion() + "]");
                FA.Flurry.StartSession(flurryKey);
            } catch (Exception e) {
                Console.WriteLine("Failed to init Flurry [key=" + flurryKey + "]");
                Console.WriteLine(e);
            }

            // initialize PlayN and start the game
            var pconfig = new IOSPlatform.Config();

            // use pconfig to customize iOS platform, if needed
            IOSPlatform.register(app, pconfig);
            PlayN.run(new FlurryExample(flurry));
            return(true);
        }
Exemple #2
0
 public override bool FinishedLaunching(UIApplication app, NSDictionary options)
 {
     app.SetStatusBarHidden(true, true);
     IOSPlatform.register(app, IOSPlatform.SupportedOrients.PORTRAITS);
     PlayN.run(new AlgebraGame());
     return(true);
 }
Exemple #3
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var p = IOSPlatform.register(app);

            PlayN.run(new HelloGame());
            return(true);
        }
Exemple #4
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var platform = IOSPlatform.register(app, IOSPlatform.SupportedOrients.LANDSCAPES);

            PlayN.run(new TestsGame());
            return(true);
        }
Exemple #5
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var pf = IOSPlatform.register(app);

            PlayN.run(new Showcase(new IOSDeviceService()));
            return(true);
        }
Exemple #6
0
 public override bool FinishedLaunching(UIApplication app, NSDictionary options)
 {
     IOSPlatform.Config config = new IOSPlatform.Config();
     config.orients = IOSPlatform.SupportedOrients.LANDSCAPES;
     IOSPlatform.register(app, config);
     PlayN.run(new TestsGame());
     return(true);
 }
Exemple #7
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            app.SetStatusBarHidden(true, true);
            var pf = IOSPlatform.register(app, IOSPlatform.SupportedOrients.PORTRAITS);

            pf.assets().setPathPrefix("assets");
            PlayN.run(new Box2DTest());
            return(true);
        }
Exemple #8
0
 public override bool FinishedLaunching(UIApplication app, NSDictionary options)
 {
     app.SetStatusBarHidden(true, true);
     IOSPlatform.Config config = new IOSPlatform.Config();
     config.orients = IOSPlatform.SupportedOrients.PORTRAITS;
     IOSPlatform.register(app, config);
     PlayN.run(new PerfTest());
     return(true);
 }
Exemple #9
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            app.SetStatusBarHidden(true, true);
            var pconfig = new IOSPlatform.Config();

            // use pconfig to customize iOS platform, if needed
            IOSPlatform.register(app, pconfig);
            PlayN.run(new Mygame());
            return(true);
        }
Exemple #10
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            app.SetStatusBarHidden(true, true);
            IOSPlatform.Config config = new IOSPlatform.Config();
            config.orients = IOSPlatform.SupportedOrients.LANDSCAPES;
            IOSPlatform platform = IOSPlatform.register(app, config);

            IOSTPPlatform.register(platform);
            PlayN.run(new TripleDemo());
            return(true);
        }
Exemple #11
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var pconfig = new IOSPlatform.Config();

            pconfig.iPadLikePhone = true;
            var platform = IOSPlatform.register(app, pconfig);

            // prior to iOS 7 we need to say that we want to extend under the status bar
            if (!UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
            {
                platform.rootViewController().WantsFullScreenLayout = true;
            }
            var iPad = (MonoTouch.UIKit.UIScreen.MainScreen.Bounds.Width >= 768);

            PlayN.run(new Pokeros(iPad ? 0.3f : 0.5f));
            return(true);
        }
Exemple #12
0
 public void logEvent(string eventName, object[] args)
 {
     if (args.Length == 0)
     {
         try {
             FA.Flurry.LogEvent(eventName);
         } catch (Exception e) {
             PlayN.log().warn("Failed to log event to Flurry [event=" + eventName + "]", e);
         }
     }
     else
     {
         var dict = new NSMutableDictionary();
         for (int ii = 0; ii < args.Length; ii += 2)
         {
             var key   = (string)args[ii];
             var value = args[ii + 1];
             if (value is string)
             {
                 dict.Add(new NSString(key), new NSString((string)value));
             }
             else if (value is java.lang.Boolean)
             {
                 dict.Add(new NSString(key), new NSNumber(((java.lang.Boolean)value).booleanValue()));
             }
             else if (value is java.lang.Integer)
             {
                 dict.Add(new NSString(key), new NSNumber(((java.lang.Integer)value).intValue()));
             }
             else
             {
                 var vclass = (value == null) ? "null" : value.GetType().ToString();
                 PlayN.log().warn("Got unknown Flurry event parameter type [key=" + key +
                                  ", value=" + value + ", vclass=" + vclass + "]");
             }
         }
         try {
             FA.Flurry.LogEvent(eventName, dict);
         } catch (Exception e) {
             PlayN.log().warn("Failed to log event to Flurry [event=" + eventName +
                              ", argCount=" + args.Length + "]", e);
         }
     }
 }