From 02b74c8ee59b426b1ada52885d428b2cb1d23e85 Mon Sep 17 00:00:00 2001 From: Bel LaPointe <153096461+breel-render@users.noreply.github.com> Date: Mon, 31 Mar 2025 19:08:38 -0600 Subject: [PATCH] doesnt work --- src/gmon/src/battle.rs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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, + } + } +}