예제 #1
0
        /// <summary>
        /// 从内部缓冲区卸载预加载效果。
        /// </summary>
        public void UnloadEffect(string path)
        {
            GameFramework.CLog.Log($"调用代理层unloadEffect:path[{path}]");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.UnloadEffect(path);
        #elif UNITY_IOS
        #endif
        }
예제 #2
0
        /// <summary>
        /// 设置音效焦点
        /// </summary>
        public void SetAudioFocus(bool isAudioFocus)
        {
            GameFramework.CLog.Log($"调用代理层setAudioFocus:isAudioFocus[{isAudioFocus}]");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.SetAudioFocus(isAudioFocus);
        #elif UNITY_IOS
        #endif
        }
예제 #3
0
        /// <summary>
        /// 设置音效音量
        /// </summary>
        public void SetEffectsVolume(float volume)
        {
            GameFramework.CLog.Log($"调用代理层setEffectsVolume:volume[{volume}]");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.SetEffectsVolume(volume);
        #elif UNITY_IOS
        #endif
        }
예제 #4
0
        /// <summary>
        /// 停止播放
        /// </summary>
        public void StopEffect(int soundId)
        {
            GameFramework.CLog.Log($"调用代理层stopEffect:soundId[{soundId}]");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.StopEffect(soundId);
        #elif UNITY_IOS
        #endif
        }
예제 #5
0
        /// <summary>
        /// 停止所有音效
        /// </summary>
        public void StopAllEffects()
        {
            GameFramework.CLog.Log($"调用代理层stopAllEffects:");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.StopAllEffects();
        #elif UNITY_IOS
        #endif
        }
예제 #6
0
        /// <summary>
        /// 释放所有音效
        /// </summary>
        public void End()
        {
            GameFramework.CLog.Log($"调用代理层end:");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.End();
        #elif UNITY_IOS
        #endif
        }
예제 #7
0
        /// <summary>
        /// 调用手机震动 milliseconds 震动时间(毫秒)shakeLevel 震动强弱 0:低强度(默认), 1:中等强度, 2:高强度 需要添加权限 <uses-permission android:name="android.permission.VIBRATE" />
        /// </summary>
        public void VibrateStatic(long milliseconds, int shakeLevel)
        {
            GameFramework.CLog.Log($"调用代理层vibrateStatic:milliseconds[{milliseconds}]shakeLevel[{shakeLevel}]");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.VibrateStatic(milliseconds, shakeLevel);
        #elif UNITY_IOS
            SDKToolIOS.VibrateStatic(milliseconds, shakeLevel);
        #endif
        }
예제 #8
0
        /// <summary>
        /// 打开URL
        /// </summary>
        public void OpenUrl(string url)
        {
            GameFramework.CLog.Log($"调用代理层openUrl:url[{url}]");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.OpenUrl(url);
        #elif UNITY_IOS
            SDKToolIOS.OpenUrl(url);
        #endif
        }
예제 #9
0
        /// <summary>
        /// 点击“版号信息”按钮 展示界面
        /// </summary>
        public void ShowGameBanHao()
        {
            GameFramework.CLog.Log($"调用代理层showGameBanHao:");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.ShowGameBanHao();
        #elif UNITY_IOS
            SDKToolIOS.ShowGameBanHao();
        #endif
        }
예제 #10
0
        /// <summary>
        /// 弹出Toast提示
        /// </summary>
        public void ShowToast(string msg)
        {
            GameFramework.CLog.Log($"调用代理层showToast:msg[{msg}]");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.ShowToast(msg);
        #elif UNITY_IOS
            SDKToolIOS.ShowToast(msg);
        #endif
        }
예제 #11
0
        /// <summary>
        /// 拷贝字符串到剪切板
        /// </summary>
        public void CopyMsgToClipboard(string msg)
        {
            GameFramework.CLog.Log($"调用代理层copyMsgToClipboard:msg[{msg}]");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.CopyMsgToClipboard(msg);
        #elif UNITY_IOS
            SDKToolIOS.CopyMsgToClipboard(msg);
        #endif
        }
예제 #12
0
        /// <summary>
        /// 打开三方分享App id :三方分享AppID
        /// </summary>
        public void OpenApp(int id)
        {
            GameFramework.CLog.Log($"调用代理层openApp:id[{id}]");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.OpenApp(id);
        #elif UNITY_IOS
            SDKToolIOS.OpenApp(id);
        #endif
        }
예제 #13
0
        /// <summary>
        /// 跳转到到隐私政策
        /// </summary>
        public void GotoPrivacyPolicyStatic()
        {
            GameFramework.CLog.Log($"调用代理层gotoPrivacyPolicyStatic:");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.GotoPrivacyPolicyStatic();
        #elif UNITY_IOS
            SDKToolIOS.GotoPrivacyPolicyStatic();
        #endif
        }
예제 #14
0
        /// <summary>
        /// 打开应用市场并跳转App详情页 packageName:需要跳转的App包名
        /// </summary>
        public void GotoAppStore(string packageName)
        {
            GameFramework.CLog.Log($"调用代理层gotoAppStore:packageName[{packageName}]");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.GotoAppStore(packageName);
        #elif UNITY_IOS
            SDKToolIOS.GotoAppStore(packageName);
        #endif
        }
예제 #15
0
        /// <summary>
        /// U3D游戏进入游戏
        /// </summary>
        public void  U3DGameStart()
        {
            GameFramework.CLog.Log($"调用代理层u3DGameStart:");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.U3DGameStart();
        #elif UNITY_IOS
            SDKToolIOS.U3DGameStart();
        #endif
        }
예제 #16
0
        /// <summary>
        /// 拷贝图片到相册 copyFile:图片路径
        /// </summary>
        public void Copy2SystemDCIM(string copyFile)
        {
            GameFramework.CLog.Log($"调用代理层copy2SystemDCIM:copyFile[{copyFile}]");

        #if JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            SDKToolAndroid.Copy2SystemDCIM(copyFile);
        #elif UNITY_IOS
            SDKToolIOS.Copy2SystemDCIM(copyFile);
        #endif
        }
예제 #17
0
        /// <summary>
        /// 播放音效 :path:音效文件路径 isLoop:是否循环 pitch:振幅频率  通常为1.0f        pan:立体声效应 0.0f-1.0f之间 gain:音量0.0f-1.0f之间
        /// </summary>
        public int PlayEffect(string path, bool isLoop, float pitch, float pan, float gain)
        {
            GameFramework.CLog.Log($"调用代理层playEffect:path[{path}]isLoop[{isLoop}]pitch[{pitch}]pan[{pan}]gain[{gain}]");

            int Result = default;

        #if  JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            Result = SDKToolAndroid.PlayEffect(path, isLoop, pitch, pan, gain);
        #elif UNITY_IOS
        #endif
            GameFramework.CLog.Log($"结果为:[{ Result}]");
            return(Result);
        }
예제 #18
0
        /// <summary>
        /// 获取音效音量
        /// </summary>
        public float GetEffectsVolume()
        {
            GameFramework.CLog.Log($"调用代理层getEffectsVolume:");

            float Result = default;

        #if  JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            Result = SDKToolAndroid.GetEffectsVolume();
        #elif UNITY_IOS
        #endif
            GameFramework.CLog.Log($"结果为:[{ Result}]");
            return(Result);
        }
예제 #19
0
        /// <summary>
        /// 获得剪贴板内容, 未获取到值得情况下,等待5 * 100ms后再返回
        /// </summary>
        public string GetClipboardMsg()
        {
            GameFramework.CLog.Log($"调用代理层getClipboardMsg:");

            string Result = default;

        #if  JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            Result = SDKToolAndroid.GetClipboardMsg();
        #elif UNITY_IOS
            Result = SDKToolIOS.GetClipboardMsg();
        #endif
            GameFramework.CLog.Log($"结果为:[{ Result}]");
            return(Result);
        }
예제 #20
0
        /// <summary>
        /// 判断三方分享App是否安装 新浪微博:0 微信:1 QQ:2 QQ空间:3 Facebook:4 Twitter:5
        /// </summary>
        public bool IsAppInstalled(int id)
        {
            GameFramework.CLog.Log($"调用代理层isAppInstalled:id[{id}]");

            bool Result = default;

        #if  JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            Result = SDKToolAndroid.IsAppInstalled(id);
        #elif UNITY_IOS
            Result = SDKToolIOS.IsAppInstalled(id);
        #endif
            GameFramework.CLog.Log($"结果为:[{ Result}]");
            return(Result);
        }
예제 #21
0
        /// <summary>
        /// 是否显示“版号信息”文字按钮,0:显示,1:不显示;未配置/未获取到在线参数默认为0
        /// </summary>
        public int GetGameBanHaoType()
        {
            GameFramework.CLog.Log($"调用代理层getGameBanHaoType:");

            int Result = default;

        #if  JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            Result = SDKToolAndroid.GetGameBanHaoType();
        #elif UNITY_IOS
            Result = SDKToolIOS.GetGameBanHaoType();
        #endif
            GameFramework.CLog.Log($"结果为:[{ Result}]");
            return(Result);
        }
예제 #22
0
        /// <summary>
        /// 是否需要在线下载资源 true需要,默认为不需要
        /// </summary>
        public bool OnlineResStatic()
        {
            GameFramework.CLog.Log($"调用代理层onlineResStatic:");

            bool Result = default;

        #if  JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            Result = SDKToolAndroid.OnlineResStatic();
        #elif UNITY_IOS
            Result = SDKToolIOS.OnlineResStatic();
        #endif
            GameFramework.CLog.Log($"结果为:[{ Result}]");
            return(Result);
        }
예제 #23
0
        /// <summary>
        /// 是否是测试版本
        /// </summary>
        public bool IsDebugVersion()
        {
            GameFramework.CLog.Log($"调用代理层isDebugVersion:");

            bool Result = default;

        #if  JumpSDK || UNITY_EDITOR
        #elif UNITY_ANDROID
            Result = SDKToolAndroid.IsDebugVersion();
        #elif UNITY_IOS
            Result = SDKToolIOS.IsDebugVersion();
        #endif
            GameFramework.CLog.Log($"结果为:[{ Result}]");
            return(Result);
        }