Crate bevy_doryen

Crate bevy_doryen 

Source
Expand description

bevy_doryen is a Bevy plugin that lets you use Bevy with the Doryen roguelike library.

Usage:

App::new()
    // Insert a `DoryenPluginSettings` resource to configure the plugin.
    .insert_resource(DoryenPluginSettings {
        // `app_options` lets you configure Doryen just as if you were
        // using Doryen without Bevy. The default is `AppOptions::default()`.
        app_options: AppOptions {
            show_cursor: true,
            resizable: true,
            ..AppOptions::default()
        },
        // Lets you configure which mouse buttons to listen for. The default
        // is left, middle and right click.
        mouse_button_listeners: vec![
            MouseButton::Left,
            MouseButton::Middle,
            MouseButton::Right,
        ],
        // Lets you configure how the application should behave when resized.
        // The default is `ResizeMode::Nothing`. See `ResizeMode`'s
        // documentation for more information.
        resize_mode: ResizeMode::Nothing
    })
    // Add the `DoryenPlugin` to Bevy.
    .add_plugins(DoryenPlugin)
    // Add your Bevy systems like usual. Excluding startup systems, which
    // only run once, these systems are run during Doryen's update phase;
    // i.e. 60 times per second.
    .add_systems(Startup, init)
    .add_systems(Update, input)
    // The `Render` schedules lets you add systems that should
    // be run during Doryen's render phase.
    .add_systems(Render, render)
    .run();

Modules§

doryen
Re-export of the Doryen library types.
prelude
Common imports

Structs§

Capture
Emitting this event causes bevy_doryen to return UpdateEvent::Capture from its Doryen update function, which saves a screenshot. See its documentation for more details.
DoryenPlugin
The Bevy Doryen plugin.
DoryenPluginSettings
DoryenPlugin settings.
First
Runs first in the schedule. This is run by the MainRender schedule.
FpsInfo
This resource contains the values given by fps and average_fps on the current update tick.
Input
Provides access to the input events handled by the Doryen engine. See the documentation for the InputApi type for details on what values should be used with the various key methods.
Keys
An iterator visiting all keys in arbitrary order.
Last
Runs last in the schedule. This is run by the MainRender schedule.
MainRender
The schedule that contains the render logic that is evaluated each tick of doryen_rs::Engine::render.
MainRenderScheduleOrder
Defines the schedules to be run for the Render schedule, including their order.
PostRender
The schedule that contains logic that must run after Render.
PreRender
The schedule that contains logic that must run before Render.
Render
The schedule that contains render logic.
RenderSchedulePlugin
Initializes the Render schedule, sub schedules, and resources for a given App.
Resized
Resized event object. Whenever Doryen’s resize method is called, an event of this type is emitted.
RootConsole
Provides access to the root console of the Doryen engine.
SetFontPath
When you want to change Doryen’s font path, emit an event of this type. bevy_doryen will call set_font_path with the provided value. See its documentation for more details.

Enums§

MouseButton
Represents buttons on a mouse.
ResizeMode
How the DoryenPlugin reacts to the resize event from Doryen.