Source and Target

<
>
December 16, 2020

To properly work with Blueprints, it’s necessary to have Source and Target Structures to handle Materials.
A Source can be set to spawn any Material, while a Target can consume it.
Both of the two Structures keep track of their spawned or consumed Material count.

pub struct Source {
    pub spawning: Material,
    pub n_spawned: usize,
}

pub struct Target {
    pub accepting: Option<Material>,
    pub n_accepted: usize,
}