コード例 #1
0
ファイル: ShineSetup.cs プロジェクト: shineTeam7/home3
        /// <summary>
        /// 启动
        /// </summary>
        public static void setup(GameObject root, Action exitRun = null)
        {
            if (_inited)
            {
                return;
            }

            _inited = true;

            _root = root;

            GameObject.DontDestroyOnLoad(_root);

            _exitRun = exitRun;

            _rootBehavious = _root.AddComponent <ShineBehavious>();

            SystemControl.init();
            ThreadControl.init();
            DateControl.init();
            NetControl.init();
            BytesControl.init();

            //显示部分
            if (ShineSetting.isWholeClient)
            {
                SKeyboardControl.init();
                STouchControl.init();
                UIControl.init();

                CameraControl.init();
                Tween.init();

                LoadControl.init();
                ResourceInfoControl.init();
                AssetPoolControl.init();
            }
            else
            {
                //gm指令所需
                if (ShineSetting.needGMCommandUI)
                {
                    SKeyboardControl.init();
                    STouchControl.init();
                    UIControl.init();
                }

                ShineSetting.debugJumpResourceVersion = true;
                ResourceInfoControl.initBase();
            }
        }