예제 #1
0
        // Use this for initialization
        private void Awake()
        {
            Inst = this;
            this.gameObject.AddComponent <IEnumeratorTool>();
            //框架配置
            LoadFrameConfig();
            //游戏配置
            if (Application.isEditor)
            {
                this.GameConfig = this.transform.GetComponent <Config>().Data;
            }
            else
            {
                if (this.ConfigContent)
                {
                    this.GameConfig = JsonMapper.ToObject <GameConfig>(this.ConfigContent.text);
                }
                else
                {
                    BDebug.LogError("GameConfig配置为null,请检查!");
                }
            }


            //启动本地
            LaunchLocal();
        }
예제 #2
0
 // Use this for initialization
 private void Awake()
 {
     Inst = this;
     this.gameObject.AddComponent <IEnumeratorTool>();
     this.Config = this.gameObject.GetComponent <Config>();
     LaunchLocal();
     //
 }
예제 #3
0
        // Use this for initialization
        private void Awake()
        {
            Inst = this;
            this.gameObject.AddComponent <IEnumeratorTool>();
            var debug = this.gameObject.GetComponent <BDebug>();

            //框架配置
            LoadFrameConfig();
            //游戏配置
            if (this.ConfigText)
            {
                this.GameConfig = JsonMapper.ToObject <GameConfig>(this.ConfigText.text);
            }
            else
            {
                BDebug.LogError("GameConfig配置为null,请检查!");
            }
            //日志打印
            debug.IsLog = this.GameConfig.IsDebugLog;
        }
예제 #4
0
        // Use this for initialization
        private void Awake()
        {
            Inst = this;
            this.gameObject.AddComponent <IEnumeratorTool>();
            var debug = this.gameObject.GetComponent <BDebug>();

            //游戏配置
            if (this.ConfigText)
            {
                this.GameConfig = JsonMapper.ToObject <GameConfig>(this.ConfigText.text);
            }
            else
            {
                BDebug.LogError("GameConfig配置为null,请检查!");
            }
            //日志打印
            debug.IsLog = this.GameConfig.IsDebugLog;
            //添加不删除的组件
            if (Application.isPlaying)
            {
                DontDestroyOnLoad(this);
            }
        }