fantasy-craft 0.0.2

A 2D / 2.5D game engine built on top of Macroquad and Hecs for the Foxvoid Ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use hecs::Entity;

use crate::prelude::ComponentLoader;

#[derive(Debug, Default)]
pub struct GuiElement;

pub struct GuiElementLoader;

impl ComponentLoader for GuiElementLoader {
    fn load(&self, ctx: &mut crate::prelude::Context, entity: Entity, _data: &serde_json::Value) {
        ctx.world.insert_one(entity, GuiElement).expect("Failed to insert GuiElement");
    }
}