use godot::{classes::{IResource, Resource}, obj::{Base, NoBase}, prelude::godot_api};
use godot::prelude::*;

#[derive(GodotClass)]
#[class(base=Resource)]
pub(crate) struct PlayerData {
    base: Base<Resource>,
    #[export]
    pub(crate) id: i32,
    #[export]
    pub(crate) username: GString,
}

#[godot_api]
impl IResource for PlayerData {
    fn init(base: Base<Resource>) -> Self {
        let id = 0;
        let username = "";
        Self { base, id, username: username.into() }
    }
}
