Пример #1
0
        private void OnGUI()
        {
            if (GUILayout.Button("获取ID"))
            {
                GameBox.GetBuiltInModule<IRouteManager>().Route("MyController@DDD",new RouteDemoEventArgs(gameObject),
                    response=> {

                        Debug.Log(response);

                    });
            }

            if (GUILayout.Button("获取Name"))
            {
                GameBox.GetBuiltInModule<IRouteManager>().Route("MyController@CCC", new RouteDemoEventArgs(gameObject),
                    response => {

                        Debug.Log(response);


                    });
            }

            if (GUILayout.Button("移除MyModel模型"))
            {
                GameBox.GetBuiltInModule<IModelManager>().RemoveModel<MyModel>();
            }

            if (GUILayout.Button("添加MyModel模型"))
            {
                GameBox.GetBuiltInModule<IModelManager>().GetModel<MyModel>();
            }

        }
Пример #2
0
 private string CCC(BaseEventArgs a)
 {
     Debug.Log("控制器处理!  " + (a as RouteDemoEventArgs).GO.name);
     return GameBox.GetBuiltInModule<IModelManager>().GetModel<MyModel>().Logic_UserNameWithCondition();
 }
Пример #3
0
 private void Awake()
 {
     GameBox.GetBuiltInModule<IRouteManager>();
     GameBox.GetBuiltInModule<IModelManager>();
 }