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
15
use crate::{input::{focus::InputFocus, manager::InputManager, system::input_focus_update_system}, prelude::{App, GameState, Plugin, Stage, System}};

pub struct InputPlugin;

impl Plugin for InputPlugin {
    fn build(&self, app: &mut App) {
        app.context.insert_resource(InputFocus::default());
        app.context.insert_resource(InputManager::new());

        app.add_system(Stage::Update, System::new(
            input_focus_update_system,
            vec![GameState::Playing, GameState::Menu]
        ));
    }
}