| 33 | // clang-format on |
| 34 | |
| 35 | int main() |
| 36 | { |
| 37 | BehaviorTreeFactory factory; |
| 38 | factory.registerNodeType<DummyNodes::SaySomething>("SaySomething"); |
| 39 | |
| 40 | enum Color |
| 41 | { |
| 42 | RED = 1, |
| 43 | BLUE = 2, |
| 44 | GREEN = 3 |
| 45 | }; |
| 46 | // We can add these enums to the scripting language |
| 47 | factory.registerScriptingEnums<Color>(); |
| 48 | |
| 49 | // Or we can do it manually |
| 50 | factory.registerScriptingEnum("THE_ANSWER", 42); |
| 51 | |
| 52 | auto tree = factory.createTreeFromText(xml_text); |
| 53 | tree.tickWhileRunning(); |
| 54 | |
| 55 | return 0; |
| 56 | } |
| 57 | |
| 58 | /* Expected output: |
| 59 |
nothing calls this directly
no test coverage detected