feat: update to bevy 14.1, some day it will see release
This commit is contained in:
@@ -0,0 +1,173 @@
|
|||||||
|
use bevy_app::{App, Plugin, PreUpdate};
|
||||||
|
use bevy_derive::{Deref, DerefMut};
|
||||||
|
use bevy_ecs::system::{In, IntoSystem};
|
||||||
|
use bevy_ecs::{
|
||||||
|
event::EventReader,
|
||||||
|
system::{Res, ResMut, Resource},
|
||||||
|
};
|
||||||
|
use bevy_input::{
|
||||||
|
keyboard::KeyCode,
|
||||||
|
mouse::{MouseButton, MouseMotion, MouseScrollUnit, MouseWheel},
|
||||||
|
ButtonInput,
|
||||||
|
};
|
||||||
|
use bevy_utils::HashMap;
|
||||||
|
|
||||||
|
use crate::{
|
||||||
|
contract::{Action, GameState, InputsContainer},
|
||||||
|
resource::*,
|
||||||
|
};
|
||||||
|
|
||||||
|
pub struct ControlsPlugin<A: Action, Ic: InputsContainer<A>, Gs: GameState> {
|
||||||
|
_action: std::marker::PhantomData<A>,
|
||||||
|
_inputs_container: std::marker::PhantomData<Ic>,
|
||||||
|
_game_state: std::marker::PhantomData<Gs>,
|
||||||
|
controls: Controls<A, Gs>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<A: Action, Ic: InputsContainer<A>, Gs: GameState> Default for ControlsPlugin<A, Ic, Gs> {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self {
|
||||||
|
_action: std::marker::PhantomData,
|
||||||
|
_inputs_container: std::marker::PhantomData,
|
||||||
|
_game_state: std::marker::PhantomData,
|
||||||
|
controls: Controls::<A, Gs>::default(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<A: Action, Ic: InputsContainer<A>, Gs: GameState> ControlsPlugin<A, Ic, Gs> {
|
||||||
|
pub fn new(controls: Controls<A, Gs>) -> Self {
|
||||||
|
Self {
|
||||||
|
_action: std::marker::PhantomData,
|
||||||
|
_inputs_container: std::marker::PhantomData,
|
||||||
|
_game_state: std::marker::PhantomData,
|
||||||
|
controls,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Resource, Default, Debug, Deref, DerefMut)]
|
||||||
|
struct TrigeredInputs(HashMap<InputType, InputValue>);
|
||||||
|
|
||||||
|
impl<A: Action, Ic: InputsContainer<A>, Gs: GameState> Plugin for ControlsPlugin<A, Ic, Gs> {
|
||||||
|
fn build(&self, app: &mut App) {
|
||||||
|
app
|
||||||
|
.insert_resource(self.controls.clone())
|
||||||
|
.init_resource::<Ic>()
|
||||||
|
.init_resource::<TrigeredInputs>()
|
||||||
|
.insert_state::<Gs>(Gs::default())
|
||||||
|
.add_systems(
|
||||||
|
PreUpdate,
|
||||||
|
Self::collect_inputs.pipe(Self::fill_players_inputs),
|
||||||
|
);
|
||||||
|
|
||||||
|
#[cfg(feature = "reflect")]
|
||||||
|
app.register_type::<Controls<A, Gs>>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<A: Action, Ic: InputsContainer<A>, Gs: GameState> ControlsPlugin<A, Ic, Gs> {
|
||||||
|
// Separate collecting and filling is necessary becouse order of complicate imputs in future
|
||||||
|
fn collect_inputs(
|
||||||
|
keyboard_button: Res<ButtonInput<KeyCode>>,
|
||||||
|
mouse_buttons: Res<ButtonInput<MouseButton>>,
|
||||||
|
mut scroll_evr: EventReader<MouseWheel>,
|
||||||
|
mut motion_evr: EventReader<MouseMotion>,
|
||||||
|
// mut collected_inputs: ResMut<TrigeredInputs>,
|
||||||
|
) -> TrigeredInputs {
|
||||||
|
let mut collected_inputs = TrigeredInputs(HashMap::new());
|
||||||
|
for key in keyboard_button.get_pressed() {
|
||||||
|
collected_inputs.insert(InputType::Keyboard(*key), InputValue::Boolean(true));
|
||||||
|
}
|
||||||
|
|
||||||
|
// buttons.get_just_released()
|
||||||
|
|
||||||
|
for button in mouse_buttons.get_pressed() {
|
||||||
|
collected_inputs.insert(
|
||||||
|
InputType::Mouse(MouseInput::Button(*button)),
|
||||||
|
InputValue::Boolean(true),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
for ev in motion_evr.read() {
|
||||||
|
collected_inputs.insert(
|
||||||
|
InputType::Mouse(MouseInput::Axis(AxisName::Horizontal)),
|
||||||
|
InputValue::Float(ev.delta.x),
|
||||||
|
);
|
||||||
|
collected_inputs.insert(
|
||||||
|
InputType::Mouse(MouseInput::Axis(AxisName::Vertical)),
|
||||||
|
InputValue::Float(ev.delta.y),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
for ev in scroll_evr.read() {
|
||||||
|
match ev.unit {
|
||||||
|
MouseScrollUnit::Line => {
|
||||||
|
collected_inputs.insert(
|
||||||
|
InputType::Mouse(MouseInput::Wheel(AxisName::Horizontal)),
|
||||||
|
InputValue::Float(ev.x),
|
||||||
|
);
|
||||||
|
collected_inputs.insert(
|
||||||
|
InputType::Mouse(MouseInput::Wheel(AxisName::Vertical)),
|
||||||
|
InputValue::Float(ev.y),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
MouseScrollUnit::Pixel => {
|
||||||
|
panic!("I'm do not accept you to use touch pad in my game");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
collected_inputs
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: ! Zero out values that did not arrive
|
||||||
|
fn fill_players_inputs(
|
||||||
|
In(collected_inputs): In<TrigeredInputs>,
|
||||||
|
mut inputs_container: ResMut<Ic>,
|
||||||
|
controls: Res<Controls<A, Gs>>,
|
||||||
|
game_state: Res<State<Gs>>,
|
||||||
|
) {
|
||||||
|
if let Some(inputs) = inputs_container.me_mut() {
|
||||||
|
// TODO: only on controls change
|
||||||
|
let mut action_binding_pairs: Vec<(&A, &BindingConfig<Gs>, &Binding<Gs>)> = Vec::new();
|
||||||
|
for (action, config) in controls.iter() {
|
||||||
|
for binding in config.bindings.iter() {
|
||||||
|
action_binding_pairs.push((action, config, binding));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
action_binding_pairs.sort_by(|a, b| b.2.input.len().cmp(&a.2.input.len()));
|
||||||
|
|
||||||
|
'bindings_loop: for (action, _config, binding) in action_binding_pairs.iter() {
|
||||||
|
// check binding conditions
|
||||||
|
for condition in &binding.conditions {
|
||||||
|
match condition {
|
||||||
|
BindingCondition::InGameState(state) => {
|
||||||
|
if *state != *game_state.get() {
|
||||||
|
continue 'bindings_loop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//log::info!("{:#?}", collected_inputs);
|
||||||
|
//log::info!("{:#?}", action_binding_pairs[0]);
|
||||||
|
|
||||||
|
match &binding.input {
|
||||||
|
ButtonCombination::Single(input_type) => {
|
||||||
|
// TODO: exclude if used
|
||||||
|
if let Some(value) = collected_inputs.get(&*input_type) {
|
||||||
|
inputs.forced_set(**action, *value);
|
||||||
|
} else {
|
||||||
|
inputs.forced_set(**action, InputValue::Empty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// TODO: print onece
|
||||||
|
log::warn!("cannot find me in inputs container");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Generated
+183
-98
@@ -238,11 +238,10 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-executor"
|
name = "async-executor"
|
||||||
version = "1.8.0"
|
version = "1.11.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c"
|
checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-lock 3.2.0",
|
|
||||||
"async-task",
|
"async-task",
|
||||||
"concurrent-queue",
|
"concurrent-queue",
|
||||||
"fastrand 2.0.1",
|
"fastrand 2.0.1",
|
||||||
@@ -339,11 +338,11 @@ dependencies = [
|
|||||||
"bevy-inspector-egui-derive",
|
"bevy-inspector-egui-derive",
|
||||||
"bevy_app 0.12.1",
|
"bevy_app 0.12.1",
|
||||||
"bevy_asset",
|
"bevy_asset",
|
||||||
"bevy_core",
|
"bevy_core 0.12.1",
|
||||||
"bevy_core_pipeline",
|
"bevy_core_pipeline",
|
||||||
"bevy_ecs 0.12.1",
|
"bevy_ecs 0.12.1",
|
||||||
"bevy_egui",
|
"bevy_egui",
|
||||||
"bevy_hierarchy",
|
"bevy_hierarchy 0.12.1",
|
||||||
"bevy_log",
|
"bevy_log",
|
||||||
"bevy_math 0.12.1",
|
"bevy_math 0.12.1",
|
||||||
"bevy_pbr",
|
"bevy_pbr",
|
||||||
@@ -400,16 +399,18 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_app"
|
name = "bevy_app"
|
||||||
version = "0.13.2"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ab348a32e46d21c5d61794294a92d415a770d26c7ba8951830b127b40b53ccc4"
|
checksum = "0af99549f5de61cc91c8c23303b13aa07f97b73fbace39695dee0a0a32cec9d4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy_derive 0.13.2",
|
"bevy_derive 0.14.1",
|
||||||
"bevy_ecs 0.13.2",
|
"bevy_ecs 0.14.1",
|
||||||
"bevy_reflect 0.13.2",
|
"bevy_reflect 0.14.1",
|
||||||
"bevy_tasks 0.13.2",
|
"bevy_tasks 0.14.1",
|
||||||
"bevy_utils 0.13.2",
|
"bevy_utils 0.14.1",
|
||||||
|
"console_error_panic_hook",
|
||||||
"downcast-rs",
|
"downcast-rs",
|
||||||
|
"thiserror",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"web-sys",
|
"web-sys",
|
||||||
]
|
]
|
||||||
@@ -463,13 +464,14 @@ name = "bevy_controls"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy-inspector-egui",
|
"bevy-inspector-egui",
|
||||||
"bevy_app 0.13.2",
|
"bevy_app 0.14.1",
|
||||||
"bevy_controls_macros",
|
"bevy_controls_macros",
|
||||||
"bevy_derive 0.13.2",
|
"bevy_derive 0.14.1",
|
||||||
"bevy_ecs 0.13.2",
|
"bevy_ecs 0.14.1",
|
||||||
"bevy_input 0.13.2",
|
"bevy_input 0.14.1",
|
||||||
"bevy_reflect 0.12.1",
|
"bevy_reflect 0.14.1",
|
||||||
"bevy_utils 0.12.1",
|
"bevy_state",
|
||||||
|
"bevy_utils 0.14.1",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
"log",
|
"log",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -511,6 +513,20 @@ dependencies = [
|
|||||||
"bytemuck",
|
"bytemuck",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bevy_core"
|
||||||
|
version = "0.14.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8ccc7118a2865267136afb5e6a2c0aed30994e522f298b2ba0b088878e6ddf59"
|
||||||
|
dependencies = [
|
||||||
|
"bevy_app 0.14.1",
|
||||||
|
"bevy_ecs 0.14.1",
|
||||||
|
"bevy_reflect 0.14.1",
|
||||||
|
"bevy_tasks 0.14.1",
|
||||||
|
"bevy_utils 0.14.1",
|
||||||
|
"uuid",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_core_pipeline"
|
name = "bevy_core_pipeline"
|
||||||
version = "0.12.1"
|
version = "0.12.1"
|
||||||
@@ -519,7 +535,7 @@ checksum = "b4b77c4fca6e90edbe2e72da7bc9aa7aed7dfdfded0920ae0a0c845f5e11084a"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy_app 0.12.1",
|
"bevy_app 0.12.1",
|
||||||
"bevy_asset",
|
"bevy_asset",
|
||||||
"bevy_core",
|
"bevy_core 0.12.1",
|
||||||
"bevy_derive 0.12.1",
|
"bevy_derive 0.12.1",
|
||||||
"bevy_ecs 0.12.1",
|
"bevy_ecs 0.12.1",
|
||||||
"bevy_log",
|
"bevy_log",
|
||||||
@@ -546,11 +562,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_derive"
|
name = "bevy_derive"
|
||||||
version = "0.13.2"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f0e01f8343f391e2d6a63b368b82fb5b252ed43c8713fc87f9a8f2d59407dd00"
|
checksum = "8675f337f374b2b8ae90539982b947d171f9adb302d00c032b823bd5231f8978"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy_macro_utils 0.13.2",
|
"bevy_macro_utils 0.14.1",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.48",
|
"syn 2.0.48",
|
||||||
]
|
]
|
||||||
@@ -562,7 +578,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "fa38ca5967d335cc1006a0e0f1a86c350e2f15fd1878449f61d04cd57a7c4060"
|
checksum = "fa38ca5967d335cc1006a0e0f1a86c350e2f15fd1878449f61d04cd57a7c4060"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy_app 0.12.1",
|
"bevy_app 0.12.1",
|
||||||
"bevy_core",
|
"bevy_core 0.12.1",
|
||||||
"bevy_ecs 0.12.1",
|
"bevy_ecs 0.12.1",
|
||||||
"bevy_log",
|
"bevy_log",
|
||||||
"bevy_time",
|
"bevy_time",
|
||||||
@@ -584,7 +600,7 @@ dependencies = [
|
|||||||
"bevy_utils 0.12.1",
|
"bevy_utils 0.12.1",
|
||||||
"downcast-rs",
|
"downcast-rs",
|
||||||
"event-listener 2.5.3",
|
"event-listener 2.5.3",
|
||||||
"fixedbitset",
|
"fixedbitset 0.4.2",
|
||||||
"rustc-hash",
|
"rustc-hash",
|
||||||
"serde",
|
"serde",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
@@ -593,22 +609,22 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_ecs"
|
name = "bevy_ecs"
|
||||||
version = "0.13.2"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "98e612a8e7962ead849e370f3a7e972b88df879ced05cd9dad6a0286d14650cf"
|
checksum = "7a3eed7f144811946ebfa1c740da9e3bcd6dd2dd4da844eda085249d29bc9fef"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-channel 2.1.1",
|
"bevy_ecs_macros 0.14.1",
|
||||||
"bevy_ecs_macros 0.13.2",
|
"bevy_ptr 0.14.1",
|
||||||
"bevy_ptr 0.13.2",
|
"bevy_reflect 0.14.1",
|
||||||
"bevy_reflect 0.13.2",
|
"bevy_tasks 0.14.1",
|
||||||
"bevy_tasks 0.13.2",
|
"bevy_utils 0.14.1",
|
||||||
"bevy_utils 0.13.2",
|
"bitflags 2.4.1",
|
||||||
"downcast-rs",
|
"concurrent-queue",
|
||||||
"fixedbitset",
|
"fixedbitset 0.5.7",
|
||||||
"rustc-hash",
|
"nonmax",
|
||||||
|
"petgraph",
|
||||||
"serde",
|
"serde",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"thread_local",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -625,11 +641,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_ecs_macros"
|
name = "bevy_ecs_macros"
|
||||||
version = "0.13.2"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "807b5106c3410e58f4f523b55ea3c071e2a09e31e9510f3c22021c6a04732b5b"
|
checksum = "d523630f2eb9fde6727e6c5ea48fa708079c5345da21ffeb1a4bd8ca761830da"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy_macro_utils 0.13.2",
|
"bevy_macro_utils 0.14.1",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.48",
|
"syn 2.0.48",
|
||||||
@@ -665,7 +681,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "06bd477152ce2ae1430f5e0a4f19216e5785c22fee1ab23788b5982dc59d1a55"
|
checksum = "06bd477152ce2ae1430f5e0a4f19216e5785c22fee1ab23788b5982dc59d1a55"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy_app 0.12.1",
|
"bevy_app 0.12.1",
|
||||||
"bevy_core",
|
"bevy_core 0.12.1",
|
||||||
"bevy_ecs 0.12.1",
|
"bevy_ecs 0.12.1",
|
||||||
"bevy_log",
|
"bevy_log",
|
||||||
"bevy_reflect 0.12.1",
|
"bevy_reflect 0.12.1",
|
||||||
@@ -673,6 +689,20 @@ dependencies = [
|
|||||||
"smallvec",
|
"smallvec",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bevy_hierarchy"
|
||||||
|
version = "0.14.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bb332d2789442ca1577c765977bafefea1dcd4db29479713ec8c6932dfb82cdb"
|
||||||
|
dependencies = [
|
||||||
|
"bevy_app 0.14.1",
|
||||||
|
"bevy_core 0.14.1",
|
||||||
|
"bevy_ecs 0.14.1",
|
||||||
|
"bevy_reflect 0.14.1",
|
||||||
|
"bevy_utils 0.14.1",
|
||||||
|
"smallvec",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_input"
|
name = "bevy_input"
|
||||||
version = "0.12.1"
|
version = "0.12.1"
|
||||||
@@ -689,15 +719,15 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_input"
|
name = "bevy_input"
|
||||||
version = "0.13.2"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "47f2b2b3df168c6ef661d25e09abf5bd4fecaacd400f27e5db650df1c3fa3a3b"
|
checksum = "a9ce5f27a8729b473205b01927cd6a5c4898a004cb8fcffa7c896e19ba999d98"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy_app 0.13.2",
|
"bevy_app 0.14.1",
|
||||||
"bevy_ecs 0.13.2",
|
"bevy_ecs 0.14.1",
|
||||||
"bevy_math 0.13.2",
|
"bevy_math 0.14.1",
|
||||||
"bevy_reflect 0.13.2",
|
"bevy_reflect 0.14.1",
|
||||||
"bevy_utils 0.13.2",
|
"bevy_utils 0.14.1",
|
||||||
"serde",
|
"serde",
|
||||||
"smol_str",
|
"smol_str",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
@@ -712,11 +742,11 @@ dependencies = [
|
|||||||
"bevy_a11y",
|
"bevy_a11y",
|
||||||
"bevy_app 0.12.1",
|
"bevy_app 0.12.1",
|
||||||
"bevy_asset",
|
"bevy_asset",
|
||||||
"bevy_core",
|
"bevy_core 0.12.1",
|
||||||
"bevy_derive 0.12.1",
|
"bevy_derive 0.12.1",
|
||||||
"bevy_diagnostic",
|
"bevy_diagnostic",
|
||||||
"bevy_ecs 0.12.1",
|
"bevy_ecs 0.12.1",
|
||||||
"bevy_hierarchy",
|
"bevy_hierarchy 0.12.1",
|
||||||
"bevy_input 0.12.1",
|
"bevy_input 0.12.1",
|
||||||
"bevy_log",
|
"bevy_log",
|
||||||
"bevy_math 0.12.1",
|
"bevy_math 0.12.1",
|
||||||
@@ -762,15 +792,14 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_macro_utils"
|
name = "bevy_macro_utils"
|
||||||
version = "0.13.2"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "eb270c98a96243b29465139ed10bda2f675d00a11904f6588a5f7fc4774119c7"
|
checksum = "7ec4a585ec2a6dedd4f4143c07219d120ae142121929f0d83e68d82a452cdc9b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"rustc-hash",
|
|
||||||
"syn 2.0.48",
|
"syn 2.0.48",
|
||||||
"toml_edit 0.21.1",
|
"toml_edit 0.22.12",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -785,11 +814,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_math"
|
name = "bevy_math"
|
||||||
version = "0.13.2"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f06daa26ffb82d90ba772256c0ba286f6c305c392f6976c9822717974805837c"
|
checksum = "40253578fe83a5ffe5f4fcb4dfa196b7d9c50f36dc8efaa231a53344bf4b3e57"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"glam 0.25.0",
|
"bevy_reflect 0.14.1",
|
||||||
|
"glam 0.27.0",
|
||||||
|
"rand",
|
||||||
|
"serde",
|
||||||
|
"smallvec",
|
||||||
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -820,7 +854,7 @@ dependencies = [
|
|||||||
"bevy_window",
|
"bevy_window",
|
||||||
"bitflags 2.4.1",
|
"bitflags 2.4.1",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"fixedbitset",
|
"fixedbitset 0.4.2",
|
||||||
"naga_oil",
|
"naga_oil",
|
||||||
"radsort",
|
"radsort",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
@@ -835,9 +869,9 @@ checksum = "c77ec20c8fafcdc196508ef5ccb4f0400a8d193cb61f7b14a36ed9a25ad423cf"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_ptr"
|
name = "bevy_ptr"
|
||||||
version = "0.13.2"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8050e2869fe341db6874203b5a01ff12673807a2c7c80cb829f6c7bea6997268"
|
checksum = "7ed72afbb6249a6803a3ed7bd2f68ff080d9392f550475e050b34c1e1c1e3e8f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_reflect"
|
name = "bevy_reflect"
|
||||||
@@ -860,17 +894,18 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_reflect"
|
name = "bevy_reflect"
|
||||||
version = "0.13.2"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ccbd7de21d586457a340a0962ad0747dc5098ff925eb6b27a918c4bdd8252f7b"
|
checksum = "fb37e8fc3c61d04da480c95cc8c303aa7781afed6be01dae333b336af493c38e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy_ptr 0.13.2",
|
"bevy_ptr 0.14.1",
|
||||||
"bevy_reflect_derive 0.13.2",
|
"bevy_reflect_derive 0.14.1",
|
||||||
"bevy_utils 0.13.2",
|
"bevy_utils 0.14.1",
|
||||||
"downcast-rs",
|
"downcast-rs",
|
||||||
"erased-serde 0.4.4",
|
"erased-serde 0.4.4",
|
||||||
"glam 0.25.0",
|
"glam 0.27.0",
|
||||||
"serde",
|
"serde",
|
||||||
|
"smallvec",
|
||||||
"smol_str",
|
"smol_str",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
@@ -890,11 +925,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_reflect_derive"
|
name = "bevy_reflect_derive"
|
||||||
version = "0.13.2"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3ce33051bd49036d4a5a62aa3f2068672ec55f3ebe92aa0d003a341f15cc37ac"
|
checksum = "8fc00d5086f5bf534b4c2dbeba549a6b8d3223515f3cb5ba4fdaabe953ec6cea"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy_macro_utils 0.13.2",
|
"bevy_macro_utils 0.14.1",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.48",
|
"syn 2.0.48",
|
||||||
@@ -910,11 +945,11 @@ dependencies = [
|
|||||||
"async-channel 1.9.0",
|
"async-channel 1.9.0",
|
||||||
"bevy_app 0.12.1",
|
"bevy_app 0.12.1",
|
||||||
"bevy_asset",
|
"bevy_asset",
|
||||||
"bevy_core",
|
"bevy_core 0.12.1",
|
||||||
"bevy_derive 0.12.1",
|
"bevy_derive 0.12.1",
|
||||||
"bevy_ecs 0.12.1",
|
"bevy_ecs 0.12.1",
|
||||||
"bevy_encase_derive",
|
"bevy_encase_derive",
|
||||||
"bevy_hierarchy",
|
"bevy_hierarchy 0.12.1",
|
||||||
"bevy_log",
|
"bevy_log",
|
||||||
"bevy_math 0.12.1",
|
"bevy_math 0.12.1",
|
||||||
"bevy_mikktspace",
|
"bevy_mikktspace",
|
||||||
@@ -967,7 +1002,7 @@ dependencies = [
|
|||||||
"bevy_asset",
|
"bevy_asset",
|
||||||
"bevy_derive 0.12.1",
|
"bevy_derive 0.12.1",
|
||||||
"bevy_ecs 0.12.1",
|
"bevy_ecs 0.12.1",
|
||||||
"bevy_hierarchy",
|
"bevy_hierarchy 0.12.1",
|
||||||
"bevy_reflect 0.12.1",
|
"bevy_reflect 0.12.1",
|
||||||
"bevy_render",
|
"bevy_render",
|
||||||
"bevy_transform",
|
"bevy_transform",
|
||||||
@@ -978,6 +1013,32 @@ dependencies = [
|
|||||||
"uuid",
|
"uuid",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bevy_state"
|
||||||
|
version = "0.14.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "21066e7bb8014d1b1dd4f611f28c0f4ea9c7738cec2325281e4260a65072d509"
|
||||||
|
dependencies = [
|
||||||
|
"bevy_app 0.14.1",
|
||||||
|
"bevy_ecs 0.14.1",
|
||||||
|
"bevy_hierarchy 0.14.1",
|
||||||
|
"bevy_reflect 0.14.1",
|
||||||
|
"bevy_state_macros",
|
||||||
|
"bevy_utils 0.14.1",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bevy_state_macros"
|
||||||
|
version = "0.14.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a8a449823c420d1cc1fa6cf3d484570b08358e5eeedc1b86de1efcf9c10399b5"
|
||||||
|
dependencies = [
|
||||||
|
"bevy_macro_utils 0.14.1",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn 2.0.48",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_tasks"
|
name = "bevy_tasks"
|
||||||
version = "0.12.1"
|
version = "0.12.1"
|
||||||
@@ -994,14 +1055,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_tasks"
|
name = "bevy_tasks"
|
||||||
version = "0.13.2"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f07fcc4969b357de143509925b39c9a2c56eaa8750828d97f319ca9ed41897cb"
|
checksum = "84f5414c3f49c96e02ceccf5fa12fb6cfbf8b271d2a820902d6f622e9c2fa681"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-channel 2.1.1",
|
|
||||||
"async-executor",
|
"async-executor",
|
||||||
"async-task",
|
|
||||||
"concurrent-queue",
|
|
||||||
"futures-lite 2.1.0",
|
"futures-lite 2.1.0",
|
||||||
"wasm-bindgen-futures",
|
"wasm-bindgen-futures",
|
||||||
]
|
]
|
||||||
@@ -1028,7 +1086,7 @@ checksum = "d541e0c292edbd96afae816ee680e02247422423ccd5dc635c1e211a20ed64be"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy_app 0.12.1",
|
"bevy_app 0.12.1",
|
||||||
"bevy_ecs 0.12.1",
|
"bevy_ecs 0.12.1",
|
||||||
"bevy_hierarchy",
|
"bevy_hierarchy 0.12.1",
|
||||||
"bevy_math 0.12.1",
|
"bevy_math 0.12.1",
|
||||||
"bevy_reflect 0.12.1",
|
"bevy_reflect 0.12.1",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
@@ -1054,20 +1112,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_utils"
|
name = "bevy_utils"
|
||||||
version = "0.13.2"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5a9f845a985c00e0ee8dc2d8af3f417be925fb52aad4bda5b96e2e58a2b4d2eb"
|
checksum = "f6efbe5a621b56cc4ffa41074929eca84107e242302496b9bb7550675e6bf2e7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash",
|
||||||
"bevy_utils_proc_macros 0.13.2",
|
"bevy_utils_proc_macros 0.14.1",
|
||||||
"getrandom",
|
"getrandom",
|
||||||
"hashbrown 0.14.3",
|
"hashbrown 0.14.3",
|
||||||
"nonmax",
|
"thread_local",
|
||||||
"petgraph",
|
|
||||||
"smallvec",
|
|
||||||
"thiserror",
|
|
||||||
"tracing",
|
"tracing",
|
||||||
"uuid",
|
|
||||||
"web-time",
|
"web-time",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1084,9 +1138,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_utils_proc_macros"
|
name = "bevy_utils_proc_macros"
|
||||||
version = "0.13.2"
|
version = "0.14.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bef158627f30503d5c18c20c60b444829f698d343516eeaf6eeee078c9a45163"
|
checksum = "36a1e91b4294cad2d08620ac062509395d4f65247b636946d6497eaeccf4dbfd"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -1121,7 +1175,7 @@ dependencies = [
|
|||||||
"bevy_app 0.12.1",
|
"bevy_app 0.12.1",
|
||||||
"bevy_derive 0.12.1",
|
"bevy_derive 0.12.1",
|
||||||
"bevy_ecs 0.12.1",
|
"bevy_ecs 0.12.1",
|
||||||
"bevy_hierarchy",
|
"bevy_hierarchy 0.12.1",
|
||||||
"bevy_input 0.12.1",
|
"bevy_input 0.12.1",
|
||||||
"bevy_math 0.12.1",
|
"bevy_math 0.12.1",
|
||||||
"bevy_tasks 0.12.1",
|
"bevy_tasks 0.12.1",
|
||||||
@@ -1660,6 +1714,12 @@ version = "0.4.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
|
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fixedbitset"
|
||||||
|
version = "0.5.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "flate2"
|
name = "flate2"
|
||||||
version = "1.0.28"
|
version = "1.0.28"
|
||||||
@@ -1802,11 +1862,12 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "glam"
|
name = "glam"
|
||||||
version = "0.25.0"
|
version = "0.27.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3"
|
checksum = "9e05e7e6723e3455f4818c7b26e855439f7546cf617ef669d1adedb8669e5cb9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
|
"rand",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -2533,7 +2594,7 @@ version = "0.6.4"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9"
|
checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fixedbitset",
|
"fixedbitset 0.4.2",
|
||||||
"indexmap 2.1.0",
|
"indexmap 2.1.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -2628,6 +2689,21 @@ version = "0.1.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "17fd96390ed3feda12e1dfe2645ed587e0bea749e319333f104a33ff62f77a0b"
|
checksum = "17fd96390ed3feda12e1dfe2645ed587e0bea749e319333f104a33ff62f77a0b"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rand"
|
||||||
|
version = "0.8.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
||||||
|
dependencies = [
|
||||||
|
"rand_core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rand_core"
|
||||||
|
version = "0.6.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "range-alloc"
|
name = "range-alloc"
|
||||||
version = "0.1.3"
|
version = "0.1.3"
|
||||||
@@ -2999,7 +3075,7 @@ checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.1.0",
|
"indexmap 2.1.0",
|
||||||
"toml_datetime",
|
"toml_datetime",
|
||||||
"winnow",
|
"winnow 0.5.33",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -3010,18 +3086,18 @@ checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.1.0",
|
"indexmap 2.1.0",
|
||||||
"toml_datetime",
|
"toml_datetime",
|
||||||
"winnow",
|
"winnow 0.5.33",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml_edit"
|
name = "toml_edit"
|
||||||
version = "0.21.1"
|
version = "0.22.12"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1"
|
checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.1.0",
|
"indexmap 2.1.0",
|
||||||
"toml_datetime",
|
"toml_datetime",
|
||||||
"winnow",
|
"winnow 0.6.18",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -3290,9 +3366,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "web-time"
|
name = "web-time"
|
||||||
version = "0.2.4"
|
version = "1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0"
|
checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
@@ -3742,6 +3818,15 @@ dependencies = [
|
|||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winnow"
|
||||||
|
version = "0.6.18"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "x11rb"
|
name = "x11rb"
|
||||||
version = "0.12.0"
|
version = "0.12.0"
|
||||||
|
|||||||
@@ -11,12 +11,13 @@ inspector-egui = ["reflect", "dep:bevy-inspector-egui"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy-inspector-egui = { version = "0.22.1", optional = true }
|
bevy-inspector-egui = { version = "0.22.1", optional = true }
|
||||||
bevy_app = "0.13.2"
|
bevy_app = "0.14.1"
|
||||||
bevy_derive = "0.13.2"
|
bevy_derive = "0.14.1"
|
||||||
bevy_ecs = "0.13.2"
|
bevy_ecs = "0.14.1"
|
||||||
bevy_input = "0.13.2"
|
bevy_input = "0.14.1"
|
||||||
bevy_reflect = { version = "0.12.1", optional = true }
|
bevy_state = "0.14.1"
|
||||||
bevy_utils = "0.12.1"
|
bevy_reflect = { version = "0.14.1", optional = true }
|
||||||
|
bevy_utils = "0.14.1"
|
||||||
log = "0.4.20"
|
log = "0.4.20"
|
||||||
serde = { version = "1.0.194", optional = true }
|
serde = { version = "1.0.194", optional = true }
|
||||||
strum = "0.26.2"
|
strum = "0.26.2"
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
|
|
||||||
use bevy_ecs::{schedule::States, system::Resource};
|
use bevy_ecs::system::Resource;
|
||||||
#[cfg(feature = "inspector-egui")]
|
#[cfg(feature = "inspector-egui")]
|
||||||
use bevy_inspector_egui::inspector_options::InspectorOptionsType;
|
use bevy_inspector_egui::inspector_options::InspectorOptionsType;
|
||||||
|
use bevy_state::state::{FreelyMutableState, States};
|
||||||
use strum::IntoEnumIterator;
|
use strum::IntoEnumIterator;
|
||||||
// #[cfg(all(feature = "reflect", feature = "serialize"))]
|
// #[cfg(all(feature = "reflect", feature = "serialize"))]
|
||||||
// use bevy_reflect::{ReflectDeserialize, ReflectSerialize};
|
// use bevy_reflect::{ReflectDeserialize, ReflectSerialize};
|
||||||
@@ -40,7 +41,7 @@ pub trait Action:
|
|||||||
// SAFETY: inspector-egui includes reflect
|
// SAFETY: inspector-egui includes reflect
|
||||||
#[supertraits]
|
#[supertraits]
|
||||||
pub trait GameState:
|
pub trait GameState:
|
||||||
'static + std::marker::Sync + std::marker::Send + States + Default + std::fmt::Debug
|
'static + std::marker::Sync + std::marker::Send + States + Default + std::fmt::Debug + FreelyMutableState
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
use bevy_app::{App, Plugin, PreUpdate};
|
use bevy_app::{App, Plugin, PreUpdate};
|
||||||
use bevy_derive::{Deref, DerefMut};
|
use bevy_derive::{Deref, DerefMut};
|
||||||
use bevy_ecs::system::{In, IntoSystem};
|
use bevy_ecs::system::{In, IntoSystem};
|
||||||
|
use bevy_state::app::AppExtStates;
|
||||||
use bevy_ecs::{
|
use bevy_ecs::{
|
||||||
event::EventReader,
|
event::EventReader,
|
||||||
schedule::State,
|
|
||||||
system::{Res, ResMut, Resource},
|
system::{Res, ResMut, Resource},
|
||||||
};
|
};
|
||||||
use bevy_input::{
|
use bevy_input::{
|
||||||
@@ -11,6 +11,7 @@ use bevy_input::{
|
|||||||
mouse::{MouseButton, MouseMotion, MouseScrollUnit, MouseWheel},
|
mouse::{MouseButton, MouseMotion, MouseScrollUnit, MouseWheel},
|
||||||
ButtonInput,
|
ButtonInput,
|
||||||
};
|
};
|
||||||
|
use bevy_state::state::State;
|
||||||
use bevy_utils::HashMap;
|
use bevy_utils::HashMap;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|||||||
Generated
+3
-6
@@ -43,19 +43,16 @@
|
|||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": [
|
|
||||||
"flake-utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712196778,
|
"lastModified": 1723429325,
|
||||||
"narHash": "sha256-SOiwCr2HtmYpw8OvQQVRPtiCBWwndbIoPqtsamZK3J8=",
|
"narHash": "sha256-4x/32xTCd+xCwFoI/kKSiCr5LQA2ZlyTRYXKEni5HR8=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "20e7895d1873cc64c14a9f024a8e04f5824bed28",
|
"rev": "65e3dc0fe079fe8df087cd38f1fe6836a0373aad",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
+2
-1
@@ -1,2 +1,3 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = '1.76.0'
|
channel = '1.79.0'
|
||||||
|
components = ["rustfmt", "clippy"]
|
||||||
|
|||||||
Reference in New Issue
Block a user