Wrapping test
This commit is contained in:
parent
c50cd54925
commit
ea0c1357cf
3 changed files with 19 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ pub enum PlantType {
|
|||
|
||||
#[derive(GodotClass)]
|
||||
#[class(base=Node)]
|
||||
struct GodotGenome {
|
||||
pub struct GodotGenome {
|
||||
#[export]
|
||||
from_plant: PlantType,
|
||||
genome: Genome,
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
pub mod godot_genome;
|
||||
pub mod plant;
|
||||
|
|
|
|||
17
rust-pvz-genetics/src/wrapper/plant.rs
Normal file
17
rust-pvz-genetics/src/wrapper/plant.rs
Normal file
|
|
@ -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) {
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue