diff --git a/src/gmon/src/battle.rs b/src/gmon/src/battle.rs index f0552fd..94e3c48 100644 --- a/src/gmon/src/battle.rs +++ b/src/gmon/src/battle.rs @@ -1,7 +1,26 @@ use ::mon::*; +use godot::classes::{ISprite2D, Sprite2D}; +use godot::prelude::*; pub type Instance = mon::battle::Instance; -pub type Engine = mon::battle::Engine; pub type Team = mon::battle::Team; pub type Event = mon::battle::Event; pub type Move = mon::battle::Move; + +#[derive(GodotClass)] +#[class(base=Sprite2D)] +struct Engine { + instance: mon::battle::Engine, + + base: Base, +} + +#[godot_api] +impl ISprite2D for Engine { + fn init(base: Base) -> Self { + Self { + instance: mon::battle::Engine::new(), + base: base, + } + } +}