24 lines
431 B
Rust
24 lines
431 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 to_string(&self) -> GString {
|
|
"Hello there".to_gstring()
|
|
}
|
|
|
|
fn setup_local_to_scene(&mut self) {}
|
|
|
|
fn reset_state(&mut self) {}
|
|
}
|