/// <summary>
 /// Unity Awake
 /// </summary>
 protected virtual void Awake()
 {
     DontDestroyOnLoad(gameObject);
     application = CreateApplication(DebugLevel);
     BeforeBootstrap(application);
     application.Bootstrap(GetBootstraps());
 }
Beispiel #2
0
 /// <summary>
 /// Unity Awake
 /// </summary>
 protected virtual void Awake()
 {
     DontDestroyOnLoad(gameObject);
     application = new UnityApplication(this);
     application.Bootstrap(GetBootstraps());
     application.Init();
 }
Beispiel #3
0
 protected virtual void Awake()
 {
     DontDestroyOnLoad(gameObject);
     App.That = application = CreateApplication(DebugLevel);
     application.SetDispatcher(dispatcher = CreateEventDispatcher());
     BeforeBootstrap(application);
     application.Bootstrap(GetBootstraps());
 }
Beispiel #4
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();
        }
Beispiel #5
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);
        }
Beispiel #6
0
 /// <summary>
 /// Unity Awake
 /// </summary>
 protected virtual void Awake()
 {
     application = new UnityApplication(this);
     application.Bootstrap(GetBootstraps());
     application.Init();
 }