diff options
author | IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> | 2022-07-16 21:09:11 +0200 |
---|---|---|
committer | IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> | 2022-07-16 21:09:11 +0200 |
commit | 9c061b9997d0add3298b1230426dd7332b91420f (patch) | |
tree | e26c6f23178e6dc3078ddc1948cd37180336e7d4 /rust/src/goal_trigger.rs | |
parent | 28e29e51e2c48868d0a75586ba3f8d73858342e3 (diff) | |
download | 2022-9c061b9997d0add3298b1230426dd7332b91420f.tar.gz 2022-9c061b9997d0add3298b1230426dd7332b91420f.tar.bz2 2022-9c061b9997d0add3298b1230426dd7332b91420f.zip |
goal post hitbox and level loader in gd script
Diffstat (limited to 'rust/src/goal_trigger.rs')
-rw-r--r-- | rust/src/goal_trigger.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/rust/src/goal_trigger.rs b/rust/src/goal_trigger.rs new file mode 100644 index 0000000..457eb7b --- /dev/null +++ b/rust/src/goal_trigger.rs @@ -0,0 +1,30 @@ +use gdnative::api::*; +use gdnative::prelude::*; +use gdnative::core_types::VariantArray; +use gdnative::object::*; + +/// The SpinningCube "class" +#[derive(NativeClass)] +#[inherit(Node)] +pub struct GoalTriggerZone { + level_loader: Option<Ref<Node>>, +} + +#[methods] +impl GoalTriggerZone { + fn new(_owner: &Node) -> Self { + GoalTriggerZone { + level_loader: None, + } + } + + #[export] + unsafe fn _ready(&mut self, owner: &Node) { + // TODO get loader + } + + #[export] + fn overlap(&mut self, owner: &Node) { + godot_print!("OVERLAPPED"); + } +} |