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§
Structs§
- Capture
- Emitting this event causes bevy_doryen to return
UpdateEvent::Capturefrom its Doryenupdatefunction, which saves a screenshot. See its documentation for more details. - Doryen
Plugin - The Bevy Doryen plugin.
- Doryen
Plugin Settings - DoryenPlugin settings.
- First
- Runs first in the schedule.
This is run by the
MainRenderschedule. - FpsInfo
- This resource contains the values given by
fpsandaverage_fpson the current update tick. - Input
- Provides access to the input events handled by the Doryen engine. See the
documentation for the
InputApitype for details on what values should be used with the variouskeymethods. - Keys
- An iterator visiting all keys in arbitrary order.
- Last
- Runs last in the schedule.
This is run by the
MainRenderschedule. - Main
Render - The schedule that contains the render logic that is evaluated each tick of
doryen_rs::Engine::render. - Main
Render Schedule Order - Defines the schedules to be run for the
Renderschedule, including their order. - Post
Render - 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.
- Render
Schedule Plugin - Initializes the
Renderschedule, sub schedules, and resources for a givenApp. - Resized
- Resized event object. Whenever Doryen’s
resizemethod is called, an event of this type is emitted. - Root
Console - Provides access to the root console of the Doryen engine.
- SetFont
Path - When you want to change Doryen’s font path, emit an event of this type.
bevy_doryen will call
set_font_pathwith the provided value. See its documentation for more details.
Enums§
- Mouse
Button - Represents buttons on a mouse.
- Resize
Mode - How the
DoryenPluginreacts to the resize event from Doryen.