Пример #1
0
        public override void Awake()
        {
            //创建Prefab
            if (InstantiateObjs != null)
            {
                foreach (var item in InstantiateObjs)
                {
                    GameObject temp = Instantiate(item);
                    temp.transform.SetParent(transform);
                }
            }
            //创建临时对象
            if (TempGO == null)
            {
                TempGO           = new GameObject("TempGO");
                TempGO.hideFlags = HideFlags.HideInHierarchy;
            }
            Application.wantsToQuit += OnWantsToQuit;
            Ins      = this;
            MonoType = MonoType.Global;
            base.Awake();
            DontDestroyOnLoad(this);
            AddPlatformSDKComponet();
            DOTween.Init();
            CLog.LoadTag(BaseConstMgr.Path_LoggerTag);
            //携程
            CommonCoroutine = new BaseCoroutineMgr("Common");
            MainUICoroutine = new BaseCoroutineMgr("MainUI");
            BattleCoroutine = new BaseCoroutineMgr("Battle");
            Pos             = BaseConstMgr.FarawayPos;

            //CALLBACK
            LuaMgr.Callback_OnLuaParseEnd += OnLuaParsed;
        }