aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src/goal_trigger.rs
blob: 457eb7b1b5453a513adeca224a7f0f6c817d5555 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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");
    }
}