当前位置:网站首页>Introduction to common classes on the runtime side
Introduction to common classes on the runtime side
2022-06-26 09:06:00 【LixiSchool】
https://www.behaviac.com/basic_classes/
In the use of behaviac Runtime end (Runtime) Source code or API when , There are a few of the most commonly used classes worth noting : Such as Workspace、Agent、Config etc. .
Workspace class
Workspace Class is mainly used to manage the export of type information , load 、 uninstall 、 perform 、 Stop executing the behavior tree , Set the time, frame number, etc .
- GetInstance() : Used to get Workspace Single instance of .
- ExportMetas(const char*) : Export the type information file to the specified path , See documentation 《C++ Registration and export of type information in the runtime side 》.
- SetFilePath(const char*) : Used to specify the directory where the behavior tree file is located when loading the behavior tree .
- SetFileFormat(EFileFormat) : Used to specify the format of the loading behavior tree file , Include Xml、Bson、Cpp/Cs、Default. among Default Means to try to load first Xml Format , If not, try loading again Bson Format , Finally, try loading Cpp/Cs Format , This function can be used for hot update of behavior tree .
- Update() : Used to perform all Agent Current behavior tree for , The behavior tree can also be executed without passing the API, You can call it by yourself Agent Of btexec() Method , See documentation 《 The update process on the runtime side 》.
- DebugUpdate() : Methods for performing debugging and hot loading , If already used Update() Method to execute , It is not necessary to call this... During continuous debugging or hot loading DebugUpdate() Method .
- SetIsExecAgents(bool) : Used to stop / Continue with all Agent Current behavior tree for , The premise is that the behavior tree is implemented through Update() Method initiated . If it is called by itself Agent Of btexec() Method , Through Agent Of SetActive(bool) Method to stop / Carry on .
- SetTimeSinceStartup(double) : Used to set the total time of the game from start to current , This total time is mainly used for time 、 Waiting time and other time-related node execution . If you do not set this value every frame , These nodes will not work properly .
- SetFrameSinceStartup(int) : Used to set the total number of frames of the game from start to current , This total number of frames is mainly used for the number of frames 、 Wait for the execution of nodes related to the number of frames, such as the number of frames . If you do not set this value every frame , These nodes will not work properly .
The specific code can be viewed behaviac/base/workspace.h
Agent class
Static methods :
- Create(const char*, int, short) : Used to create Agent Example .
- Destroy(Agent*) : Used to destroy Agent Example .
- Register() : Register the Agent class , Used to record the type information of this class .
- UnRegister() : Unregister the Agent class .
- RegisterInstanceName(const char*, const wchar_t*, const wchar_t*) : Register instance name , As part of the type information , After export, it can be used to configure nodes in the editor .
- UnRegisterInstanceName(const char*) : Unregister instance name .
- BindInstance(Agent*, const char*, int) : Will be a Agent Instance is bound to a name .
- UnbindInstance(const char*, int) : Cancel a certain Agent The binding of an instance to a name .
Member method :
- btload(const char*, bool) : Used to load the behavior tree with the specified name , No suffix is required ( File format ).
- btunload(const char*) : Used to unload the behavior tree with the specified name .
- btsetcurrent(const char*) : Used to set the current behavior tree .
- btexec() : Execute the current behavior tree .
- SetActive(bool) : Used to stop / Continue executing the current behavior tree , If set to false, Indicates to stop executing the current behavior tree ; otherwise , Indicates continued execution .
- FireEvent(const char*) : Used to issue events , So that the events bound in the behavior tree can be responded .
- SetIdFlag(uint32_t) : This node is used to set whether to track this... During continuous debugging Agent. By static method SetIdMask() Set all Agent Of Mask value , And then through SetIdFlag() Set up current Agent Of Flag value . If IsMasked() Return to true , Indicates that the Agent.
- SetName(const char*) : Used to set the name .
The specific code can be viewed behaviac/agent/agent.h
Config class
See documentation 《 Development function switch 》.
边栏推荐
- Install Anaconda + NVIDIA graphics card driver + pytorch under win10_ gpu
- 20220213 Cointegration
- XSS 跨站脚本攻击
- Live review | smardaten lihongfei interprets the Research Report on China's low / no code industry: the wind direction has changed
- Machine learning (Part 1)
- phpcms v9手机访问电脑站一对一跳转对应手机站页面插件
- phpcms小程序插件4.0版正式上线
- 20220623 getting started with Adobe Illustrator
- HDU - 6225 little boxes (\u int128)
- 实践是成为网工最快的方法,网络工程师实战项目整理
猜你喜欢

dedecms小程序插件正式上线,一键安装无需任何php或sql基础

编辑类型信息

Phpcms V9 mobile phone access computer station one-to-one jump to the corresponding mobile phone station page plug-in

Phpcms V9 remove the phpsso module

基于SSM的毕业论文管理系统

Yolov5进阶之四训练自己的数据集

Graduation thesis management system based on SSM

Detailed explanation of traditional image segmentation methods

行为树的基本概念及进阶

Section IV HQL execution process
随机推荐
In depth study paper reading target detection (VII) Chinese version: yolov4 optimal speed and accuracy of object detection
基于SSM的毕业论文管理系统
phpcms v9商城模块(修复自带支付宝接口bug)
编辑类型信息
Selenium builds cookies pool to bypass authentication and anti crawl login
编程训练7-日期转换问题
phpcms小程序插件api接口升级到4.3(新增批量获取接口、搜索接口等)
Efficiency thesis Reading 1
Detailed explanation of traditional image segmentation methods
外部排序和大小堆相关知识
Ultrasonic image segmentation
commonJS和ES6模块化的区别
Selenium 搭建 Cookies池 绕过验证反爬登录
1.Intro_ Math (white board derivation and reprint of station B)
Applet realizes picture preloading (picture delayed loading)
教程1:Hello Behaviac
cookie session 和 token
Yolov5进阶之四训练自己的数据集
Programming training 7- date conversion problem
[IVI] 15.1.2 system stability optimization (lmkd Ⅱ) psi pressure stall information