doesnt work
parent
42831b71a1
commit
02b74c8ee5
|
|
@ -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<Sprite2D>,
|
||||
}
|
||||
|
||||
#[godot_api]
|
||||
impl ISprite2D for Engine {
|
||||
fn init(base: Base<Sprite2D>) -> Self {
|
||||
Self {
|
||||
instance: mon::battle::Engine::new(),
|
||||
base: base,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue