예제 #1
0
 /// <summary>
 /// 发送统计数据
 /// </summary>
 public void sendInfo()
 {
     if (isSupportSendInfo)
     {
         object[] parameter = new object[] { this.guid, this.playerId, this.level, this.nickName, this.serverId };
         AllSdkStatistic.instance().callAndroidSdkStaticFunction(StatisticFunctionEnum.sendInfo.ToString(), parameter, statisticClassPath);
     }
 }
예제 #2
0
        /// <summary>
        /// 发送统计数据
        /// </summary>
        public void sendInfo()
        {
#if UNITY_ANDROID
            if (isSupportSendInfo)
            {
                object[] parameter = new object[] { infoType, key, data };
                AllSdkStatistic.instance().callAndroidSdkStaticFunction(StatisticFunctionEnum.sendInfo.ToString(), parameter, statisticClassPath);
            }
#endif
        }
예제 #3
0
        /// <summary>
        /// 初始化统计插件
        /// </summary>
        public void initStatistic()
        {
            if (isSupportInit)
            {
#if UNITY_ANDROID
                object[] parameter = new object[] { AllSdkStatistic.instance().getMainCotext() };
                AllSdkStatistic.instance().callAndroidSdkStaticFunction(StatisticFunctionEnum.initStatistic.ToString(), parameter, statisticClassPath);
#endif
            }
        }
예제 #4
0
        /// <summary>
        /// 获取平台控制单例
        /// </summary>
        /// <returns></returns>
        public static AllSdkStatistic instance()
        {
            //_instance = GameObject.FindObjectOfType(typeof(AllSdkStatistic)) as AllSdkStatistic;
            if (_instance == null)
            {
                var obj = new GameObject("AllSdkStatistic");
                _instance = obj.AddComponent <AllSdkStatistic>();
                Object.DontDestroyOnLoad(_instance.gameObject);
            }

            return(_instance);
        }
예제 #5
0
        /// <summary>
        /// 获取信息
        /// </summary>
        public string getInfo()
        {
#if UNITY_ANDROID
            if (isSupportGetInfo)
            {
                object[] parameter = new object[] { AllSdkStatistic.instance().getMainCotext() };
                return(AllSdkStatistic.instance().callAndroidSdkStaticFunctionWithReturn(StatisticFunctionEnum.getInfo.ToString(), parameter, statisticClassPath));
            }
            else
            {
                return("");
            }
#endif
            return("");
        }