Simple action system for Bevy.

Overview

bevy_action

Simple action system for Bevy.

Introduction

This plugin exists mainly to facilitate a common action system for other plugins to hook in to (e.g. bevy_action_animation).

It also serves as a way to decouple certain parts of game logic to avoid hard-coding things, such as hard-coding input handling to actions rather than directly to movement logic.

There are three main components, the Action trait, the ActionEvent event, and the ActionPlugin.

Usage

Start by defining your own type to represent the actions (enum is recommended). You will then need to derive the required traits:

#[derive(Clone, Debug, PartialEq, Eq, Hash, Default, Action)]
enum MyAction {
  #[default]
  Idle,
  Left,
  Right,
  Jump
}

Next, register the plugin using this type as the generic parameter:

fn main() {
  App::new()
    ...
    .add_plugin(ActionPlugin::<MyAction>::default())
    ...
}

Now, ActionEvent<MyAction> can be used with EventReader and EventWriter just like any normal Bevy event.

Compatibility

Bevy Version Plugin Version
0.10.x 0.1
You might also like...
An atomic save/load system for Bevy Game Engine.

☢️ Bevy Atomic Save An atomic save/load system for Bevy. Features Save and load a World into a RON file on disk Control which entities should particip

A light-weight Anchor-Offset based 2D sprite rendering system for the bevy engine.
A light-weight Anchor-Offset based 2D sprite rendering system for the bevy engine.

Bevy AoUI A light-weight anchor-offset based 2D sprite layout system for the bevy engine. Bevy AoUI provides a light-weight rectangular anchor-offset

🎆 CPU-driven, batch-rendered particle system for the Bevy game engine.
🎆 CPU-driven, batch-rendered particle system for the Bevy game engine.

Bevy Firework 🎆 Bevy firework is a particle system plugin where particles are simulated on the CPU and use GPU batching for rendering. This allows ea

A prototype plugin providing a simple line drawing api for bevy.
A prototype plugin providing a simple line drawing api for bevy.

bevy_debug_lines A prototype plugin providing a simple line drawing api for bevy. See docs.rs for documentation. Expect breakage on master. Click on t

Simple RUST game with the Bevy Engine

Simple RUST Game using the Bevy Engine YouTube videos for this code base: Episode 1 - Rust Game Development tutorial from Scratch with Bevy Engine Epi

Simple 2d pinball game for testing of bevy and rapier.
Simple 2d pinball game for testing of bevy and rapier.

Pinball2D Using the Bevy game engine and Rapier physics engine for a simple 2D pinball game. pinball2d.mov Wrote a short piece about how the game was

A simple authoritative server networking library for Bevy.

Bevy Networking Plugin This is a simple networking plugin for the Bevy game engine. This plugin provides the building blocks which game developers can

A simple camera for properly displaying tile-based low resolution pixel perfect 2D games in bevy.
A simple camera for properly displaying tile-based low resolution pixel perfect 2D games in bevy.

Bevy Tiled Camera A simple camera for properly displaying low resolution pixel perfect 2D games in bevy. The camera will adjust the viewport to scale

Simple island generator written in rust using bevy engine
Simple island generator written in rust using bevy engine

Getting Started Easy enough to run cargo run --release Change generation speed Find the system set that looks like this .add_system_set(

Owner
undersquire
undersquire
Sci-fi run 'n' gun action RPG created in Rust, using Macroquad

Capstone - Twilight of the Archons This is an action/run 'n' gun RPG, created in Rust using macroquad. The future holds huge boss fights, and a mind-n

Ole A. Sjo Fasting 58 Dec 5, 2022
Engine / framework for creating highly customizable and user modable action RPG's

Rust RPG Toolkit PLEASE NOTE: this in early and very heavy development. API is subject to constant change, as it has newly transitioned from being a g

Ole A. Sjo Fasting 58 Dec 5, 2022
Rustification of the excellent GD Script Action RPG Tutorial by youtuber HeartBeast

Godot Action RPG w/Rust A GDNative implementation in Rust of youtuber HeartBeast 's great step-by-step turoial series creating a Godot Action RPG, usi

Nejat 14 Apr 14, 2022
🐝 An action-packed game where you play as a missile-dodging, laser-evading, upgradeable bumbly bee.

Beeline The last known specimens of the Andor flower, the flower with the tastiest nectar in the world, are preserved at the Mount Dared fortified mil

plam 4 Oct 6, 2022
A simple extension for `bevy-editor-pls` to support tilemap editing right inside the bevy app.

What is this This is a simple tilemap editor plugin, that hooks right into bevy_editor_pls to work with bevy_ecs_tilemap. It works completely within i

null 3 May 8, 2023
Bevy Simple Portals is a Bevy game engine plugin aimed to create portals.

Portals for Bevy Bevy Simple Portals is a Bevy game engine plugin aimed to create portals. Those portals are (for now) purely visual and can be used t

Sélène Amanita 11 May 28, 2023
Minecraft-esque voxel engine prototype made with the bevy game engine. Pending bevy 0.6 release to undergo a full rewrite.

vx_bevy A voxel engine prototype made using the Bevy game engine. Goals and features Very basic worldgen Animated chunk loading (ala cube world) Optim

Lucas Arriesse 125 Dec 31, 2022
bevy-hikari is an implementation of voxel cone tracing global illumination with anisotropic mip-mapping in Bevy

Bevy Voxel Cone Tracing bevy-hikari is an implementation of voxel cone tracing global illumination with anisotropic mip-mapping in Bevy. Bevy Version

研究社交 208 Dec 27, 2022
Minecraft using Bevy and Bevy-Meshem

minecraft_bevy Minecraft_bevy was built to showcase bevy_meshem. After a week of developing it has: Chunk loading / unloading each chunk's mesh is bei

Adam 7 Oct 4, 2023
Hanabi — a particle system plugin for the Bevy game engine.

Hanabi — a particle system plugin for the Bevy game engine

Jerome Humbert 256 Dec 30, 2022