gamai
made with ❤️🔥 by mrchantey
Usage
made with ❤️🔥 by mrchantey
#[tree_builder]
pub fn MyTree() -> impl AiNode {
tree! {
<sequence>
<say_hello/>
<say_world/>
</sequence>
}
}
#[node_system]
fn say_hello<Node: AiNode>(mut query: Query<&mut NodeState<Node>>){
for mut state in query.iter_mut(){
println!("hello");
//tell parent it can go to the next node now
**state = NodeState::Success;
}
}