Crate bevy_doryen[][src]

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

Usage:

App::build()
    // Add a `DoryenPluginSettings` resource to configure the plugin.
    .add_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_plugin(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_startup_system(init.system())
    .add_system(input.system())
    // The `RenderSystemExtensions` trait lets you add systems that should
    // be run during Doryen's render phase.
    .add_doryen_render_system(render.system())
.run();

Modules

doryen

Re-export of the Doryen library types.

render_stage

Constants for the Doryen plugin render stages.

Structs

DoryenPlugin

The Bevy Doryen plugin.

DoryenPluginSettings

DoryenPlugin settings.

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.

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.

Enums

MouseButton

Represents buttons on a mouse.

ResizeMode

How the DoryenPlugin reacts to the resize event from Doryen.

Traits

RenderSystemExtensions

Adds methods to the AppBuilder for adding systems to the Doryen render schedule.