diff --git a/rust-pvz-genetics/src/wrapper/godot_genome.rs b/rust-pvz-genetics/src/wrapper/godot_genome.rs index 7cb7604..296d4ca 100644 --- a/rust-pvz-genetics/src/wrapper/godot_genome.rs +++ b/rust-pvz-genetics/src/wrapper/godot_genome.rs @@ -14,7 +14,7 @@ pub enum PlantType { #[derive(GodotClass)] #[class(base=Node)] -struct GodotGenome { +pub struct GodotGenome { #[export] from_plant: PlantType, genome: Genome, diff --git a/rust-pvz-genetics/src/wrapper/mod.rs b/rust-pvz-genetics/src/wrapper/mod.rs index 1ea2455..515dca2 100644 --- a/rust-pvz-genetics/src/wrapper/mod.rs +++ b/rust-pvz-genetics/src/wrapper/mod.rs @@ -1 +1,2 @@ pub mod godot_genome; +pub mod plant; diff --git a/rust-pvz-genetics/src/wrapper/plant.rs b/rust-pvz-genetics/src/wrapper/plant.rs new file mode 100644 index 0000000..83b4f45 --- /dev/null +++ b/rust-pvz-genetics/src/wrapper/plant.rs @@ -0,0 +1,17 @@ +use godot::prelude::*; +use godot::classes::{Node2D,INode2D}; + +use crate::wrapper::godot_genome::GodotGenome; + +#[derive(GodotClass)] +#[class(init,base=Node2D)] +pub struct Plant { + #[export] + genome_path: NodePath, +} + +#[godot_api] +impl INode2D for Plant { + fn ready(&mut self) { + } +}