Crate node_tree

source
Expand description

An extendable system made up of autonomous execution services known as nodes organized in a tree of processes. Inspired by Godot!

A simple node implementation will look like the following:

use node_tree::prelude::*;


#[derive(Debug, Clone, Abstract)] // Nodes require `Debug` and `Clone`.
pub struct NodeA {
    base: NodeBase   // Required for Nodes.
}
 
impl NodeA {
    fn new(name: String) -> Self {
        NodeA { base: NodeBase::new(name) }
    }
}

impl Node for NodeA {
    // feel free to implement `ready()`, `process()`, `terminal()` and/or `process_mode()`
    // here.
}

Modules§

  • Contains everything you’ll need to create and handle Nodes and NodeTrees. You’ll probably want to import all from this module.