{"action":"closed","issue":{"url":"https://api.github.com/repos/TencentOpen/behaviac/issues/47","labels_url":"https://api.github.com/repos/TencentOpen/behaviac/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/TencentOpen/behaviac/issues/47/comments","events_url":"https://api.github.com/repos/TencentOpen/behaviac/issues/47/events","html_url":"https://github.com/TencentOpen/behaviac/issues/47","id":119511421,"number":47,"title":"关于test/usertest工程main.cpp代码执行流程问题","user":{"login":"fangdenghui","id":12146141,"avatar_url":"https://avatars.githubusercontent.com/u/12146141?v=3","gravatar_id":"","url":"https://api.github.com/users/fangdenghui","html_url":"https://github.com/fangdenghui","followers_url":"https://api.github.com/users/fangdenghui/followers","following_url":"https://api.github.com/users/fangdenghui/following{/other_user}","gists_url":"https://api.github.com/users/fangdenghui/gists{/gist_id}","starred_url":"https://api.github.com/users/fangdenghui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fangdenghui/subscriptions","organizations_url":"https://api.github.com/users/fangdenghui/orgs","repos_url":"https://api.github.com/users/fangdenghui/repos","events_url":"https://api.github.com/users/fangdenghui/events{/privacy}","received_events_url":"https://api.github.com/users/fangdenghui/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-30T15:10:52Z","updated_at":"2015-12-15T10:38:36Z","closed_at":"2015-12-15T10:38:36Z","body":"个人对这个工程的理解：我们在BTPlayer.h和BTPlayer.cpp中定义好Agent继承类，在main.cpp中头文件包含/behaviac/exported/behaviac_generated/behaviors/generated_behaviors.h使用已经编辑好的导出的行为树，也就是说在main.cpp中，我们是直接使用生成的行为树。使用的过程是先在main()函数注册使用，等运行完毕注册掉。现在有2个问题：\r\n问题1：我们为什么还要在main()函数里导出元信息？这个工作不是在未导出行为树前完成的吗？为啥在使用导出的行为树时导出元信息\r\n问题2：在注册Agent和销毁Agent的过程中,我们执行行为树，但看不出在哪执行的，唯一的代码片段是：\r\n\twhile (i++ < iCount)\r\n\t{\r\n\t\tbehaviac::Workspace::GetInstance()->Update();\r\n\t};\r\n\r\n    clock_t finish = clock();\r\n\r\n    if (iCount > 0)\r\n    {\r\n        float duration = (float)(finish - start) / CLOCKS_PER_SEC;\r\n\r\n\t\tcout << \"format \" << ffParam << \" duration(seconds):\" << duration << \" RunCount:\" << iCount << endl;\r\n    }\r\n行为树执行时间不是应该自身内部逻辑实现的吗？这段时间加的iCount是干什么的？"}}