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 }
public void updateRoleInfoWith(GameRoleInfo gameRoleInfo, bool isCreateRole) { #if UNITY_ANDROID && !UNITY_EDITOR QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance(); androidSupport.updateRoleInfo(gameRoleInfo, isCreateRole); #endif }
public void callFunction(FuncType type)//only for android { #if UNITY_ANDROID && !UNITY_EDITOR QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance(); androidSupport.callFunc(type); #endif }
public void exitGame() { #if UNITY_ANDROID && !UNITY_EDITOR QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance(); androidSupport.exitGame(); #endif }
public void pay(OrderInfo orderInfo, GameRoleInfo gameRoleInfo) { #if UNITY_ANDROID && !UNITY_EDITOR QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance(); androidSupport.pay(orderInfo, gameRoleInfo); #endif }
public void setListener(QuickSDKListener listener) { #if UNITY_ANDROID && !UNITY_EDITOR QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance(); androidSupport.setListener(listener); #endif }
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 }
public void logout() { #if UNITY_IOS && !UNITY_EDITOR quicksdk_nativeLogout(); #elif UNITY_ANDROID && !UNITY_EDITOR QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance(); androidSupport.logout(); #endif }
public string userId()//uid { #if UNITY_ANDROID && !UNITY_EDITOR QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance(); return(androidSupport.getUserId()); #else return(""); #endif }
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 }
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 }
public int channelType() //获取渠道类别 渠道唯一标识 { #if UNITY_ANDROID && !UNITY_EDITOR QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance(); return(androidSupport.getChannelType()); #else return(0); #endif }
public string SDKVersion() //QuickSDK版本 { #if UNITY_ANDROID && !UNITY_EDITOR QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance(); return(androidSupport.getSDKVersion()); #else return(""); #endif }
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 }
public string channelVersion() //获取渠道版本 { #if UNITY_ANDROID && !UNITY_EDITOR QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance(); return(androidSupport.getChannelVersion()); #else return(""); #endif }
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 }
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 }
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 }
public bool isChannelHasExitDialog() { #if UNITY_ANDROID && !UNITY_EDITOR QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance(); return(androidSupport.isChannelHasExitDialog()); #else return(false); #endif }
public static QuickUnitySupportAndroid getInstance() { if (instance == null) { instance = new QuickUnitySupportAndroid(); } return(instance); }
public string getConfigValue(string key) //QuickSDK版本 { #if UNITY_ANDROID && !UNITY_EDITOR QuickUnitySupportAndroid androidSupport = QuickUnitySupportAndroid.getInstance(); return(androidSupport.getConfigValue(key)); #else return(""); #endif }
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 }
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 }
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 }
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 }
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 }
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 }
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 }
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 }