28 lines
567 B
Rust
28 lines
567 B
Rust
use godot::prelude::*;
|
|
|
|
#[derive(GodotClass)]
|
|
#[class(base=Resource, init, tool)]
|
|
pub struct MapResource {
|
|
#[export]
|
|
pub name: GString,
|
|
#[export]
|
|
pub scene: Option<Gd<PackedScene>>,
|
|
|
|
base: Base<Resource>,
|
|
}
|
|
|
|
#[godot_api]
|
|
impl IResource for MapResource {
|
|
fn on_notification(&mut self, what: godot::classes::notify::ObjectNotification) {}
|
|
|
|
fn to_string(&self) -> GString {
|
|
"Hello there".to_gstring()
|
|
}
|
|
|
|
fn setup_local_to_scene(&mut self) {}
|
|
|
|
fn reset_state(&mut self) {}
|
|
|
|
fn set_path_cache(&self, path: GString) {}
|
|
}
|