示例#1
0
        public ServiceContainer(XCore core)
        {
            m_Core         = core;
            CatApplication = new XCatApplication(m_Core);
            App.That       = CatApplication;

            CatApplication.Instance <IXCore>(core);
        }
示例#2
0
        // Use this for initialization
        IEnumerator Start()
        {
            var application = new Application();

            application.Bootstrap();
            application.Register(new FileSystemProvider());
            application.Init();

            yield return(new WaitForEndOfFrame());

            App.Make <IFileSystem>().HelloWorld();
        }
示例#3
0
        public XCore Init(MainConfig mainConfig)
        {
            if (m_inited)
            {
                return(this);
            }
            m_inited = true;

            XLog.Print("[TinaX Framework] TinaX6 - v." + version_name + "    | Nekonya Studio | Corala.Space Project | Powerd by yomunsam - www.yomunchan.moe");

            mMainConfig = mainConfig;

            //生成一个全局的GameObject
            mBaseGameObject = GameObjectHelper.FindOrCreateGo(Setup.Framework_Base_GameObject)
                              .DontDestroy()
                              .SetPosition(new Vector3(-1000, -1000, -1000));

            //初始化配置与变量


            //启动引导系统
            m_catlib_app = new CatLib.Application();
            m_catlib_app.OnFindType((t) => Type.GetType(t));
            m_catlib_app.Bootstrap(new XBootstrap());
            m_catlib_app.Init();

            //管理器等初始化工作
            InitMgrs();

            //检查和处理自动更新
            HandleAutoUpgrade(() =>
            {
                //因为更新操作是异步的,所以接下来要执行的东西都在这个回调里

                StartupApp();
            });



            return(this);
        }
示例#4
0
 public ServiceContainer(XCore core)
 {
     m_Core         = core;
     CatApplication = new XCatApplication(m_Core);
     App.That       = CatApplication;
 }