Esempio n. 1
0
        public static void purchaseThirdPayments(string productId, string uniqueId)
        {
            Debug.Log("[GPUnity][Call] purchaseThirdPayments - " + productId + ", " + uniqueId);

#if UNITY_EDITOR
            {
                Debug.Log("GamePot -  purchaseThirdPayments not supported");
            }
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.purchaseThirdPayments(productId, uniqueId);
#endif
        }
Esempio n. 2
0
        public static void setLanguage(NCommon.GameLanguage gameLanguage)
        {
#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR setLanguage not supported");
            }
#elif UNITY_IOS
            GamePotUnityPluginiOS.setLanguage((int)gameLanguage);
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.setLanguage((int)gameLanguage);
#endif
        }
Esempio n. 3
0
        public static void submitScoreLeaderboard(string leaderBoardId, string leaderBoardScore)
        {
            Debug.Log("[GPUnity][Call] submitScoreLeaderboard - " + leaderBoardId + ", " + leaderBoardScore);

#if UNITY_EDITOR
            {
                Debug.Log("GamePot - submitScoreLeaderboard not supported");
            }
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.submitScoreLeaderboard(leaderBoardId, leaderBoardScore);
#endif
        }
Esempio n. 4
0
        public static void loadAchievement()
        {
            Debug.Log("[GPUnity][Call] loadAchievement");

#if UNITY_EDITOR
            {
                Debug.Log("GamePot -  loadAchievement not supported");
            }
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.loadAchievement();
#endif
        }
Esempio n. 5
0
        public static void incrementAchievement(string achievementId, string count)
        {
            Debug.Log("[GPUnity][Call] incrementAchievement - " + achievementId + ", " + count);

#if UNITY_EDITOR
            {
                Debug.Log("GamePot -  incrementAchievement not supported");
            }
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.incrementAchievement(achievementId, count);
#endif
        }
Esempio n. 6
0
        public static void unlockAchievement(string achievementId)
        {
            Debug.Log("[GPUnity][Call] unlockAchievement - " + achievementId);

#if UNITY_EDITOR
            {
                Debug.Log("GamePot -  unlockAchievement not supported");
            }
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.unlockAchievement(achievementId);
#endif
        }
Esempio n. 7
0
        public static void showLeaderboard()
        {
            Debug.Log("[GPUnity][Call] showLeaderboard");

#if UNITY_EDITOR
            {
                Debug.Log("GamePot - showLeaderboard not supported");
            }
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.showLeaderboard();
#endif
        }
Esempio n. 8
0
        //send Local Push
        public static int sendLocalPush(DateTime sendDate, string title, string message)
        {
#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR sendLocalPush always return -1");
            }
            return(-1);
#elif UNITY_IOS
            return(GamePotUnityPluginiOS.sendLocalPush(sendDate.ToString("yyyy-MM-dd HH:mm:ss"), title, message));
#elif UNITY_ANDROID
            return(GamePotUnityPluginAOS.sendLocalPush(sendDate, title, message));
#endif
        }
Esempio n. 9
0
        public static bool isLinked(string linkType)
        {
#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR always returns isLinked false");
            }
            return(false);
#elif UNITY_IOS
            return(GamePotUnityPluginiOS.isLinked(linkType));
#elif UNITY_ANDROID
            return(GamePotUnityPluginAOS.isLinked(linkType));
#endif
        }
Esempio n. 10
0
        public static void cancelLocalPush(string pushId)
        {
#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR cancelLocalPush not supported");
            }
            return;
#elif UNITY_IOS
            GamePotUnityPluginiOS.cancelLocalPush(Int32.Parse(pushId));
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.cancelLocalPush(Int32.Parse(pushId));
#endif
        }
Esempio n. 11
0
        public static string getLanguage()
        {
            string result = "";

#if UNITY_EDITOR
            Debug.Log("GamePot - UNITY EDITOR getLanguage always returns empty string");
#elif UNITY_IOS
            result = "ko-KR";
#elif UNITY_ANDROID
            result = GamePotUnityPluginAOS.getLanguage();
#endif
            return(result);
        }
Esempio n. 12
0
        public static void loginByThirdPartySDK(string userId)
        {
            Debug.Log("[GPUnity][Call] loginByThirdPartySDK");

#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR loginByThirdPartySDK not supported");
            }
#elif UNITY_IOS
            GamePotUnityPluginiOS.loginByThirdPartySDK(userId);
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.loginByThirdPartySDK(userId);
#endif
        }
Esempio n. 13
0
        public static void sendPurchaseByThirdPartySDK(string productId, string transactionId, string currency, double price, string store, string paymentId, string uniqueId)
        {
            Debug.Log("[GPUnity][Call] sendPurchaseByThirdPartySDK");

#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR sendPurchaseByThirdPartySDK not supported");
            }
#elif UNITY_IOS
            GamePotUnityPluginiOS.sendPurchaseByThirdPartySDK(productId, transactionId, currency, price, store, paymentId, uniqueId);
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.sendPurchaseByThirdPartySDK(productId, transactionId, currency, price, store, paymentId, uniqueId);
#endif
        }
Esempio n. 14
0
        public static void setLoggerUserid(string userid)
        {
            Debug.Log("[GPUnity][Call] setLoggerUserid");

#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR sendLog not supported");
            }
#elif UNITY_IOS
            GamePotUnityPluginiOS.setLoggerUserid(userid);
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.setLoggerUserid(userid);
#endif
        }
Esempio n. 15
0
        public static void showFaq()
        {
            Debug.Log("[GPUnity][Call] showFaq");

#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR showFaq not supported");
            }
#elif UNITY_IOS
            GamePotUnityPluginiOS.showFaq();
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.showFaq();
#endif
        }
Esempio n. 16
0
        public static void e(string errCode, string errMessage)
        {
            Debug.Log("[GPUnity][Call] e");

#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR sendLog not supported");
            }
#elif UNITY_IOS
            GamePotUnityPluginiOS.sendLog("e", errCode, errMessage);
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.sendLog("e", errCode, errMessage);
#endif
        }
Esempio n. 17
0
        public static void setVoidBuilder(NVoidInfo info)
        {
            Debug.Log("[GPUnity][Call] setVoidBuilder");

#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR setVoidBuilder not supported");
            }
#elif UNITY_IOS
            Debug.Log("GamePot - iOS setVoidBuilder not supported");
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.setVoidBuilder(info != null ? info.ToJson().ToString() : null);
#endif
        }
Esempio n. 18
0
        public static void showNotice(bool showTodayButton)
        {
            Debug.Log("[GPUnity][Call] showNotice");

#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR showNotice not supported");
            }
#elif UNITY_IOS
            GamePotUnityPluginiOS.showNotice(showTodayButton);
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.showNotice(showTodayButton);
#endif
        }
Esempio n. 19
0
        public static void showAppStatusPopup(string status)
        {
            Debug.Log("[GPUnity][Call] showAppStatusPopup - " + status);

#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR showAppStatusPopup not supported");
            }
#elif UNITY_IOS
            GamePotUnityPluginiOS.showAppStatusPopup(status);
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.showAppStatusPopup(status);
#endif
        }
Esempio n. 20
0
        public static string getConfigs()
        {
            string result = "";

#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR getConfigs always returns empty");
            }
#elif UNITY_IOS
            result = GamePotUnityPluginiOS.getConfigs();
#elif UNITY_ANDROID
            result = GamePotUnityPluginAOS.getConfigs();
#endif
            return(result);
        }
Esempio n. 21
0
        public static NPurchaseItem[] getPurchaseItems()
        {
            string result = "";

#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR getPurchaseItems always returns empty");
            }
#elif UNITY_IOS
            result = GamePotUnityPluginiOS.getPurchaseItems();
#elif UNITY_ANDROID
            result = GamePotUnityPluginAOS.getPurchaseItems();
#endif
            NPurchaseItem[] itemData = JsonMapper.ToObject <NPurchaseItem[]>(result);
            return(itemData);
        }
Esempio n. 22
0
        public static NPurchaseItem[] getPurchaseThirdPaymentsItems()
        {
            Debug.Log("[GPUnity][Call] getPurchaseThirdPaymentsItems");
            string result = "";

#if UNITY_EDITOR
            {
                Debug.Log("GamePot -  getPurchaseThirdPaymentsItems always returns empty");
            }
#elif UNITY_ANDROID
            result = GamePotUnityPluginAOS.getPurchaseThirdPaymentsItems();
#endif

            NPurchaseItem[] itemData = JsonMapper.ToObject <NPurchaseItem[]>(result);
            return(itemData);
        }
Esempio n. 23
0
        public static void initPlugin()
        {
#if UNITY_EDITOR
            {
                if (GamePotEventListener.s_instance == null)
                {
                    Debug.Log("GamePot - Creating GamePot Native Bridge Receiver");
                    new GameObject("GamePotManager", typeof(GamePotEventListener));
                }
            }
#elif UNITY_IOS
            GamePotUnityPluginiOS.initPlugin();
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.initPlugin();
#endif
        }
Esempio n. 24
0
        public static NCommon.LoginType getLastLoginType()
        {
            string result = "";

#if UNITY_EDITOR
            Debug.Log("GamePot - UNITY EDITOR getLastLoginType always returns NONE");
#elif UNITY_IOS
            result = GamePotUnityPluginiOS.getLastLoginType();
#elif UNITY_ANDROID
            result = GamePotUnityPluginAOS.getLastLoginType();
#endif

            switch (result)
            {
            case "GOOGLE":
                return(NCommon.LoginType.GOOGLE);

            case "GOOGLEPLAY":
                return(NCommon.LoginType.GOOGLEPLAY);

            case "FACEBOOK":
                return(NCommon.LoginType.FACEBOOK);

            case "NAVER":
                return(NCommon.LoginType.NAVER);

            case "GAMECENTER":
                return(NCommon.LoginType.GAMECENTER);

            case "TWITTER":
                return(NCommon.LoginType.TWITTER);

            case "LINE":
                return(NCommon.LoginType.LINE);

            case "APPLE":
                return(NCommon.LoginType.APPLE);

            case "GUEST":
                return(NCommon.LoginType.GUEST);

            case "THIRDPARTYSDK":
                return(NCommon.LoginType.THIRDPARTYSDK);
            }

            return(NCommon.LoginType.NONE);
        }
Esempio n. 25
0
        public static string getPushToken()
        {
            Debug.Log("[GPUnity][Call] getFCMToken");
            string token = "";

#if UNITY_EDITOR
            {
                Debug.Log("GamePot -  getFCMToken always returns empty string");
            }
#elif UNITY_IOS
            token = GamePotUnityPluginiOS.getPushToken();
#elif UNITY_ANDROID
            token = GamePotUnityPluginAOS.getFCMToken();
#endif

            return(token);
        }
Esempio n. 26
0
        public static bool isUseLibrary(string libraryName)
        {
            Debug.Log("[GPUnity][Call] isUseLibrary");
#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR isUseLibrary always return true");
                return(true);
            }
#elif UNITY_IOS
            {
                Debug.Log("GamePot - UNITY_IOS isUseLibrary not supported");
                return(true);
            }
#elif UNITY_ANDROID
            return(GamePotUnityPluginAOS.isUseLibrary(libraryName));
#endif
        }
Esempio n. 27
0
        public static void deleteMember()
        {
#if UNITY_EDITOR
            Debug.Log("GamePot - UNITY EDITOR DUMMY CALLBACK deleteMember always success");
            // Temporary user info for UnityEditor Development mode
            if (GamePotEventListener.s_instance != null)
            {
                GamePotEventListener.s_instance.onDeleteMemberSuccess();
            }
            else
            {
                Debug.LogError("GamePot UnityEditor listener is NULL");
            }
#elif UNITY_IOS
            GamePotUnityPluginiOS.deleteMember();
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.deleteMember();
#endif
        }
Esempio n. 28
0
        public static NPushInfo getPushStatus()
        {
            Debug.Log("[GPUnity][Call] getPushStatus");
            string result = "";

#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR getPushStatus always returns empty");
            }
#elif UNITY_IOS
            result = GamePotUnityPluginiOS.getPushStatus();
#elif UNITY_ANDROID
            result = GamePotUnityPluginAOS.getPushStatus();
#endif

            Debug.Log("[GPUnity][Call] getPushStatus result : " + result);

            NPushInfo pushInfo = JsonMapper.ToObject <NPushInfo>(result);
            return(pushInfo);
        }
Esempio n. 29
0
        public static void showWebView(string url)
        {
            Debug.Log("[GPUnity][Call] showWebView url : " + url);

#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR showWebView not supported");
            }
#elif UNITY_IOS
            {
                GamePotEventListener listener = GamePotEventListener.s_instance;
                GamePotUnityPluginiOS.showWebView(url);
                // IOS doesn't return Any Callback
                listener.onWebviewClose("");
            }
#elif UNITY_ANDROID
            {
                GamePotUnityPluginAOS.showWebView(url);
            }
#endif
        }
Esempio n. 30
0
        public static void deleteLinking(NCommon.LinkingType linkType)
        {
#if UNITY_EDITOR
            {
                Debug.Log("GamePot - UNITY EDITOR DUMMY CALLBACK deleteLinking always faulure");
                // Temporary user info for UnityEditor Development mode
                if (GamePotEventListener.s_instance != null)
                {
                    GamePotEventListener.s_instance.onDeleteLinkingFailure("");
                }
                else
                {
                    Debug.LogError("GamePot UnityEditor listener is NULL");
                }
            }
#elif UNITY_IOS
            GamePotUnityPluginiOS.deleteLinking(linkType);
#elif UNITY_ANDROID
            GamePotUnityPluginAOS.deleteLinking(linkType);
#endif
        }