Ejemplo n.º 1
0
        public bool isFunctionSupported(FuncType type)        //1暂停游戏,2进入用户中心,3进入论坛,4处理应用跳转(旧),5显示浮动工具栏,6隐藏浮动工具栏,7处理应用跳转(新)
        {
#if UNITY_IOS && !UNITY_EDITOR
            switch (type)
            {
            case FuncType.QUICK_SDK_FUNC_TYPE_ENTER_BBS:
                return(quicksdk_nativeIsFunctionTypeSupported(3));

            case FuncType.QUICK_SDK_FUNC_TYPE_ENTER_USER_CENTER:
                return(quicksdk_nativeIsFunctionTypeSupported(2));

            case FuncType.QUICK_SDK_FUNC_TYPE_SHOW_TOOLBAR:
                return(quicksdk_nativeIsFunctionTypeSupported(5));

            case FuncType.QUICK_SDK_FUNC_TYPE_HIDE_TOOLBAR:
                return(quicksdk_nativeIsFunctionTypeSupported(6));

            case FuncType.QUICK_SDK_FUNC_TYPE_PAUSED_GAME:
                return(quicksdk_nativeIsFunctionTypeSupported(1));

            case FuncType.QUICK_SDK_FUNC_TYPE_ENTER_CUSTOMER_CENTER:
                return(quicksdk_nativeIsFunctionTypeSupported(7));

            default:
                return(false);
            }
#elif UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            return(androidSupport.isFuncSupport(type));
#else
            return(false);
#endif
        }
Ejemplo n.º 2
0
        public void updateRoleInfoWith(GameRoleInfo gameRoleInfo, bool isCreateRole)
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            androidSupport.updateRoleInfo(gameRoleInfo, isCreateRole);
#endif
        }
Ejemplo n.º 3
0
        public void callFunction(FuncType type)//only for android
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            androidSupport.callFunc(type);
#endif
        }
Ejemplo n.º 4
0
        public void exitGame()
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            androidSupport.exitGame();
#endif
        }
Ejemplo n.º 5
0
        public void pay(OrderInfo orderInfo, GameRoleInfo gameRoleInfo)
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            androidSupport.pay(orderInfo, gameRoleInfo);
#endif
        }
Ejemplo n.º 6
0
        public void setListener(QuickSDKListener listener)
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            androidSupport.setListener(listener);
#endif
        }
Ejemplo n.º 7
0
 public void callSDKShare(ShareInfo shareInfo)
 {
                 #if UNITY_IOS && !UNITY_EDITOR
                 #elif UNITY_ANDROID && !UNITY_EDITOR
     QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
     androidSupport.callSDKShare(shareInfo.title, shareInfo.content, shareInfo.imgPath, shareInfo.imgUrl, shareInfo.url, shareInfo.type, shareInfo.shareTo, shareInfo.extenal);
                 #endif
 }
Ejemplo n.º 8
0
        public void logout()
        {
#if UNITY_IOS && !UNITY_EDITOR
            quicksdk_nativeLogout();
#elif UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            androidSupport.logout();
#endif
        }
Ejemplo n.º 9
0
        public string userId()//uid
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            return(androidSupport.getUserId());
#else
            return("");
#endif
        }
Ejemplo n.º 10
0
        public bool isFunctionTypeSupported(FuncType type)//1暂停游戏,2进入用户中心,3进入论坛,4处理应用跳转(旧),5显示浮动工具栏,6隐藏浮动工具栏,7处理应用跳转(新)
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            return(androidSupport.isFuncSupport(type));
#else
            return(false);
#endif
        }
Ejemplo n.º 11
0
 public void enterYunKeFuCenter(GameRoleInfo gameRoleInfo)
 {
                 #if UNITY_IOS && !UNITY_EDITOR
     quicksdk_nativeEnterYunKeFuCenter(gameRoleInfo.gameRoleID, gameRoleInfo.gameRoleName, gameRoleInfo.serverName, gameRoleInfo.vipLevel);
                 #elif UNITY_ANDROID && !UNITY_EDITOR
     QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
     androidSupport.callCustomPlugin(gameRoleInfo.gameRoleID, gameRoleInfo.gameRoleName, gameRoleInfo.serverName, gameRoleInfo.vipLevel);
                 #endif
 }
Ejemplo n.º 12
0
        public int channelType()                 //获取渠道类别 渠道唯一标识
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            return(androidSupport.getChannelType());
#else
            return(0);
#endif
        }
Ejemplo n.º 13
0
        public string SDKVersion()      //QuickSDK版本
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            return(androidSupport.getSDKVersion());
#else
            return("");
#endif
        }
Ejemplo n.º 14
0
        public int hideToolBar()
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            return(androidSupport.callFunc(FuncType.QUICK_SDK_FUNC_TYPE_HIDE_TOOLBAR));
#else
            return(0);
#endif
        }
Ejemplo n.º 15
0
        public string channelVersion()       //获取渠道版本
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            return(androidSupport.getChannelVersion());
#else
            return("");
#endif
        }
Ejemplo n.º 16
0
 public void updateRoleInfoWith(GameRoleInfo gameRoleInfo, bool isCreateRole)
 {
                 #if UNITY_IOS && !UNITY_EDITOR
     quicksdk_nativeUpdateRoleInfo(gameRoleInfo.serverID, gameRoleInfo.serverName, gameRoleInfo.gameRoleName, gameRoleInfo.gameRoleID, gameRoleInfo.gameRoleBalance, gameRoleInfo.vipLevel, gameRoleInfo.gameRoleLevel, gameRoleInfo.partyName, isCreateRole);
                 #elif UNITY_ANDROID && !UNITY_EDITOR
     QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
     androidSupport.updateRoleInfo(gameRoleInfo, isCreateRole);
                 #endif
 }
Ejemplo n.º 17
0
        public int enterBBS()//BBS
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            return(androidSupport.callFunc(FuncType.QUICK_SDK_FUNC_TYPE_ENTER_BBS));
#else
            return(0);
#endif
        }
Ejemplo n.º 18
0
        public int showToolBar(ToolbarPlace place)//1左上,2右上,3左中,4右中,5左下,6右下
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            return(androidSupport.callFunc(FuncType.QUICK_SDK_FUNC_TYPE_SHOW_TOOLBAR));
#else
            return(0);
#endif
        }
Ejemplo n.º 19
0
        public bool isChannelHasExitDialog()
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            return(androidSupport.isChannelHasExitDialog());
#else
            return(false);
#endif
        }
Ejemplo n.º 20
0
        public static QuickUnitySupportAndroid getInstance()
        {
            if (instance == null)
            {
                instance = new QuickUnitySupportAndroid();
            }

            return(instance);
        }
Ejemplo n.º 21
0
        public string getConfigValue(string key)      //QuickSDK版本
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            return(androidSupport.getConfigValue(key));
#else
            return("");
#endif
        }
Ejemplo n.º 22
0
        public void setListener(QuickSDKListener listener)
        {
#if UNITY_IOS && !UNITY_EDITOR
            string gameObjectName = listener.gameObject.name;
            quicksdk_nativeSetListener(gameObjectName);
#elif UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            androidSupport.setListener(listener);
#endif
        }
Ejemplo n.º 23
0
        public void pay(OrderInfo orderInfo, GameRoleInfo gameRoleInfo)
        {
#if UNITY_IOS && !UNITY_EDITOR
            quicksdk_nativePay(orderInfo.goodsID, orderInfo.goodsName, orderInfo.goodsDesc, orderInfo.quantifier, orderInfo.cpOrderID, orderInfo.callbackUrl, orderInfo.extrasParams, orderInfo.price, orderInfo.amount, orderInfo.count,
                               gameRoleInfo.serverID, gameRoleInfo.serverName, gameRoleInfo.gameRoleName, gameRoleInfo.gameRoleID, gameRoleInfo.gameRoleBalance, gameRoleInfo.vipLevel, gameRoleInfo.gameRoleLevel, gameRoleInfo.partyName);
#elif UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            androidSupport.pay(orderInfo, gameRoleInfo);
#endif
        }
Ejemplo n.º 24
0
 private int enterBBS()        //BBS
 {
                 #if UNITY_IOS && !UNITY_EDITOR
     return(quicksdk_nativeEnterBBS() == -100?0:1);
                 #elif UNITY_ANDROID && !UNITY_EDITOR
     QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
     return(androidSupport.callFunc(FuncType.QUICK_SDK_FUNC_TYPE_ENTER_BBS));
                 #else
     return(0);
                 #endif
 }
Ejemplo n.º 25
0
 public int enterUserCenter()         //用户中心
 {
                 #if UNITY_IOS && !UNITY_EDITOR
     return(quicksdk_nativeEnterUserCenter() == -100?0:1);
                 #elif UNITY_ANDROID && !UNITY_EDITOR
     QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
     return(androidSupport.callFunc(FuncType.QUICK_SDK_FUNC_TYPE_ENTER_USER_CENTER));
                 #else
     return(0);
                 #endif
 }
Ejemplo n.º 26
0
        public string getConfigValue(string key)              //QuickSDK版本
        {
#if UNITY_IOS && !UNITY_EDITOR
            IntPtr intPtr = quicksdk_nativeGetConfigValue(key);
            return(Marshal.PtrToStringAnsi(intPtr));
#elif UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            return(androidSupport.getConfigValue(key));
#else
            return("");
#endif
        }
Ejemplo n.º 27
0
        public string channelName()                  //获取渠道名称
        {
#if UNITY_IOS && !UNITY_EDITOR
            IntPtr intPtr = quicksdk_nativeChannelName();
            return(Marshal.PtrToStringAnsi(intPtr));
#elif UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            return(androidSupport.getChannelName());
#else
            return("");
#endif
        }
Ejemplo n.º 28
0
        public string SDKVersion()              //QuickSDK版本
        {
#if UNITY_IOS && !UNITY_EDITOR
            IntPtr intPtr = quicksdk_nativeSDKVersion();
            return(Marshal.PtrToStringAnsi(intPtr));
#elif UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            return(androidSupport.getSDKVersion());
#else
            return("");
#endif
        }
Ejemplo n.º 29
0
        public void callFunction(FuncType type)
        {
#if UNITY_IOS && !UNITY_EDITOR
            switch (type)
            {
            case FuncType.QUICK_SDK_FUNC_TYPE_ENTER_BBS:
                quicksdk_nativeEnterBBS();
                return;

            case FuncType.QUICK_SDK_FUNC_TYPE_ENTER_USER_CENTER:
                quicksdk_nativeEnterUserCenter();
                return;

            case FuncType.QUICK_SDK_FUNC_TYPE_SHOW_TOOLBAR:
                quicksdk_nativeShowToolBar(3);
                return;

            case FuncType.QUICK_SDK_FUNC_TYPE_HIDE_TOOLBAR:
                quicksdk_nativeHideToolBar();
                return;

            case FuncType.QUICK_SDK_FUNC_TYPE_PAUSED_GAME:
                quicksdk_nativePausedGame();
                return;

            case FuncType.QUICK_SDK_FUNC_TYPE_ENTER_CUSTOMER_CENTER:
                quicksdk_nativeEnterCustomerCenter();
                return;

            default:
                return;
            }
#elif UNITY_ANDROID && !UNITY_EDITOR
            QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance();
            androidSupport.callFunc(type);
#endif
        }