コード例 #1
0
 public override void Init(HonorSDKGameObject gameObject, OnFinish <ResultInit> initListener, string gameResVersion, Dictionary <string, string> configs = null)
 {
     Debug.Log("Init:gameObject=" + gameObject.name + ";gameResVersion=" + gameResVersion);
     base.Init(gameObject, initListener, gameResVersion, configs);
     InitFinish(true, "{\"abtest\":\"\",\"honor_log_debug\":\"true\",\"dynamic_setting_file_path\":\"\"}");
     GetNotchInfoFinish(true, "{\"height\":0,\"width\":0}");
 }
コード例 #2
0
ファイル: SDKManager.cs プロジェクト: 470838237/UnityDemo
        /// <summary>
        /// 初始化,此接口必须最先调用
        /// </summary>
        /// <param name="gameObject">游戏对象</param>
        /// <param name="initListener">返回初始化结果<see cref="ResultInit"/></param>
        public virtual void Init(HonorSDKGameObject gameObject, OnFinish <ResultInit> initListener, string gameResVersion, Dictionary <string, string> configs = null)
        {
            Debug.Log("SDKManager.Init");
            this.initListener = initListener;
            if (configs == null)
            {
                configs = new Dictionary <string, string>();
            }
            configs.Add("gameResVersion", gameResVersion);
            JSONClass json = new JSONClass();

            foreach (KeyValuePair <string, string> kv in configs)
            {
                json.Add(kv.Key, new JSONData(kv.Value));
            }
            mConfigs = json.ToString();
            gameObject.SetOnReceiveListener(new OnReceiveMsg(this.OnReceive));
            SetGameObjectName(gameObject.gameObject.name);
            Debug.Log(this.ToString());
        }
コード例 #3
0
 public override void Init(HonorSDKGameObject gameObject, OnFinish <ResultInit> initListener, string gameResVersion, Dictionary <string, string> configs = null)
 {
     this.initListener = initListener;
     parentImpl.Init(gameObject, initListener, gameResVersion, configs);
 }