public override void AppEventsLogPurchase(float logPurchase, string currency, Dictionary <string, object> parameters)
        {
            MethodArguments methodArguments = new MethodArguments();

            methodArguments.AddPrimative <float>("logPurchase", logPurchase);
            methodArguments.AddString("currency", currency);
            methodArguments.AddDictionary("parameters", parameters);
            AndroidFacebook.JavaMethodCall <IResult> javaMethodCall = new AndroidFacebook.JavaMethodCall <IResult>(this, "LogAppEvent");
            javaMethodCall.Call(methodArguments);
        }
        public override void AppEventsLogEvent(string logEvent, float?valueToSum, Dictionary <string, object> parameters)
        {
            MethodArguments methodArguments = new MethodArguments();

            methodArguments.AddString("logEvent", logEvent);
            methodArguments.AddNullablePrimitive <float>("valueToSum", valueToSum);
            methodArguments.AddDictionary("parameters", parameters);
            AndroidFacebook.JavaMethodCall <IResult> javaMethodCall = new AndroidFacebook.JavaMethodCall <IResult>(this, "LogAppEvent");
            javaMethodCall.Call(methodArguments);
        }
Example #3
0
        public override void Purchase(string pid, Dictionary <string, object> extras, KingskyDelegate <IPurchaseResult> callback)
        {
            MethodArguments args = new MethodArguments();

            args.AddString(PurchaseResult.IAP_PID_TAG, pid);
            args.AddDictionary(PurchaseResult.EXTRAS, extras);
            var purchaseCall = new JavaMethodCall <IPurchaseResult>(this, "Purchase");

            purchaseCall.Callback = callback;
            purchaseCall.Call(args);
        }
Example #4
0
        public override void AppEventsLogPurchase(
            float logPurchase,
            string currency,
            Dictionary <string, object> parameters)
        {
            MethodArguments args = new MethodArguments();

            args.AddPrimative("logPurchase", logPurchase);
            args.AddString("currency", currency);
            args.AddDictionary("parameters", parameters);
            var logPurchaseCall = new JavaMethodCall <IResult>(this, "LogAppEvent");

            logPurchaseCall.Call(args);
        }
Example #5
0
        public override void AppEventsLogEvent(
            string logEvent,
            float?valueToSum,
            Dictionary <string, object> parameters)
        {
            MethodArguments args = new MethodArguments();

            args.AddString("logEvent", logEvent);
            args.AddNullablePrimitive("valueToSum", valueToSum);
            args.AddDictionary("parameters", parameters);
            var appEventcall = new JavaMethodCall <IResult>(this, "LogAppEvent");

            appEventcall.Call(args);
        }
        public override void ShareTournament(Dictionary <string, string> data, FacebookDelegate <ITournamentResult> callback)
        {
            MethodArguments args = new MethodArguments();

            args.AddDictionary("data", data.ToDictionary(pair => pair.Key, pair => (object)pair.Value));

            var shareTournament = new JavaMethodCall <ITournamentResult>(
                this,
                "ShareTournament")
            {
                Callback = callback
            };

            shareTournament.Call(args);
        }
Example #7
0
        public override void Init(
            HideUnityDelegate hideUnityDelegate,
            InitDelegate onInitComplete,
            KingskyDelegate <IPurchaseResult> onPurchaseCompleteDelegate
            , Action <bool> gameCenter
            , Dictionary <string, object> extras)
        {
            GooglePlayGames.PlayGamesPlatform.Activate();
            base.Init(
                hideUnityDelegate,
                onInitComplete,
                onPurchaseCompleteDelegate, gameCenter, extras);

            var args = new MethodArguments();

            args.AddDictionary("configInfo", extras);
            var initCall = new JavaMethodCall <IResult> (this, "Init");

            initCall.Call(args);
        }
        public override void CreateTournament(
            int initialScore,
            string title,
            string imageBase64DataUrl,
            Dictionary <string, string> data,
            FacebookDelegate <ITournamentResult> callback)
        {
            MethodArguments args = new MethodArguments();

            args.AddString("initialScore", initialScore.ToString());
            args.AddString("title", title);
            args.AddString("imageBase64DataUrl", imageBase64DataUrl);
            args.AddDictionary("data", data.ToDictionary(pair => pair.Key, pair => (object)pair.Value));
            var createTournament = new JavaMethodCall <ITournamentResult>(
                this,
                "CreateTournament")
            {
                Callback = callback
            };

            createTournament.Call(args);
        }