Exemplo n.º 1
0
        /// <summary>
        /// 项目入口
        /// </summary>
        protected override void OnStartCompleted()
        {
            // Application entry, Your code starts writing here
            // called this function after, use App.Make function to get service
            // ex: App.Make<IYourService>().Debug("hello world");

            Debug.Log("Hello CatLib, Debug Level: " + App.Make <DebugLevels>());
            App.Watch <DebugLevels>(newLevel =>
            {
                Debug.Log("Change debug level: " + newLevel);
            });
        }
        /// <summary>
        /// GUI绘制
        /// </summary>
        public void OnGUI()
        {
            if (!GUI.Button(new Rect(0, 0, 100, 30), "Load Resource"))
            {
                return;
            }

            Facades.Resources.LoadSync("hello world - Facade");
            Facade <IResources> .Instance.LoadSync("hello world - Facade<>");

            App.Make <IResources>().LoadSync("hello world - App.Make");
        }
        /// <summary>
        /// 项目入口
        /// </summary>
        protected override void OnStartCompleted()
        {
            var go = App.Make <Component>().gameObject;

            go.AddComponent <TestsGUI>();
        }
 /// <summary>
 /// 项目入口
 /// </summary>
 protected override void OnStartCompleted()
 {
     App.Make <IHotfixEntry>().Entry();
 }