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>(); } }
private string CCC(BaseEventArgs a) { Debug.Log("控制器处理! " + (a as RouteDemoEventArgs).GO.name); return GameBox.GetBuiltInModule<IModelManager>().GetModel<MyModel>().Logic_UserNameWithCondition(); }
private void Awake() { GameBox.GetBuiltInModule<IRouteManager>(); GameBox.GetBuiltInModule<IModelManager>(); }