lotus_engine 0.2.2

Lotus is a game engine with the main focus of being easy-to-use and straight forward on developing 2D games.
Documentation
//! This example is a show off for the text rendering.
//! Inside the 'setup' function, each text component is spawned as an entity.
//! Each text component uses the default fonts available on the engine.
//! As the end-user you can bring your own fonts or make use of the available ones.

use lotus_engine::*;

your_game!(
    WindowConfiguration::default(),
    setup,
    update
);

fn setup(context: &mut Context) {
    let underdog_regular: Text = Text::new(
        &mut context.render_state,
        Font::new(Fonts::UnderdogRegular.get_path(), 80.0),
        Position::new(Vector2::new(-0.30, 0.0), Strategy::Normalized),
        Color::BLACK,
        "Hello Text!".to_string()
    );
    context.commands.spawn(vec![Box::new(underdog_regular)]);

    let codystar_light: Text = Text::new(
        &mut context.render_state,
        Font::new(Fonts::CodystarLight.get_path(), 80.0),
        Position::new(Vector2::new(-0.30, 0.25), Strategy::Normalized),
        Color::BLUE,
        "Hello Text!".to_string()
    );
    context.commands.spawn(vec![Box::new(codystar_light)]);

    let codystar_regular: Text = Text::new(
        &mut context.render_state,
        Font::new(Fonts::CodystarRegular.get_path(), 80.0),
        Position::new(Vector2::new(-0.30, 0.45), Strategy::Normalized),
        Color::MAGENTA,
        "Hello Text!".to_string()
    );
    context.commands.spawn(vec![Box::new(codystar_regular)]);

    let roboto_mono: Text = Text::new(
        &mut context.render_state,
        Font::new(Fonts::RobotoMono.get_path(), 80.0),
        Position::new(Vector2::new(-0.30, 0.65), Strategy::Normalized),
        Color::BROWN,
        "Hello Text!".to_string()
    );
    context.commands.spawn(vec![Box::new(roboto_mono)]);

    let roboto_mono_italic: Text = Text::new(
        &mut context.render_state,
        Font::new(Fonts::RobotoMonoItalic.get_path(), 80.0),
        Position::new(Vector2::new(-0.30, 0.85), Strategy::Normalized),
        Color::RED,
        "Hello Text!".to_string()
    );
    context.commands.spawn(vec![Box::new(roboto_mono_italic)]);
}

fn update(_context: &mut Context) {}