Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchantey committed Jul 14, 2024
2 parents 09dc68a + e0ec870 commit e2954ba
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 22 deletions.
6 changes: 3 additions & 3 deletions crates/beet_ecs/src/observers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
pub mod action_observer;
#[allow(unused_imports)]
pub use self::action_observer::*;
pub mod action_observers_builder;
#[allow(unused_imports)]
pub use self::action_observers_builder::*;
pub mod action_observer_map;
#[allow(unused_imports)]
pub use self::action_observer_map::*;
pub mod action_observers_builder;
#[allow(unused_imports)]
pub use self::action_observers_builder::*;
pub mod add_observer_hooks;
#[allow(unused_imports)]
pub use self::add_observer_hooks::*;
Expand Down
3 changes: 0 additions & 3 deletions crates/beet_examples/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
// #![allow(unused, dead_code)]
pub mod serde_utils;

pub mod components;
pub mod net;
pub mod plugins;
pub mod scenes;


pub mod prelude {
pub use crate::components::*;
pub use crate::net::*;
pub use crate::plugins::*;
pub use crate::scenes;
pub use crate::serde_utils::*;
Expand Down
3 changes: 0 additions & 3 deletions crates/beet_examples/src/net/mod.rs

This file was deleted.

14 changes: 1 addition & 13 deletions crates/beet_examples/src/plugins/example_default_plugins.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#[cfg(any(target_arch = "wasm32", feature = "tokio"))]
use crate::beet::prelude::*;
use crate::prelude::load_scenes_from_args;
use crate::prelude::*;
use bevy::asset::AssetMetaCheck;
use bevy::input::common_conditions::input_toggle_active;
use bevy::prelude::*;
Expand All @@ -13,20 +11,10 @@ use forky_bevy::systems::close_on_esc;
#[derive(Default)]
pub struct ExampleDefaultPlugins;


#[cfg(feature = "tokio")]
const DEFAULT_SOCKET_URL: &str = "ws://127.0.0.1:3000/ws";

impl Plugin for ExampleDefaultPlugins {
fn build(&self, app: &mut App) {
assert_local_assets();

#[cfg(target_arch = "wasm32")]
app.add_transport(WebEventClient::new_with_window());

#[cfg(feature = "tokio")]
app.add_transport(NativeWsClient::new(DEFAULT_SOCKET_URL).unwrap());

app.add_plugins((
DefaultPlugins
.set(WindowPlugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ impl Plugin for ExampleReplicatePlugin {
.add_event::<SomeCustomEvent>()
.replicate_event_incoming::<SomeCustomEvent>()
/*-*/;

#[cfg(feature = "tokio")]
const DEFAULT_SOCKET_URL: &str = "ws://127.0.0.1:3000/ws";

#[cfg(target_arch = "wasm32")]
app.add_transport(WebEventClient::new_with_window());

#[cfg(feature = "tokio")]
app.add_transport(NativeWsClient::new(DEFAULT_SOCKET_URL).unwrap());
}
}

Expand Down
3 changes: 3 additions & 0 deletions crates/beet_examples/src/plugins/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ pub use self::example_default_plugins::*;
pub mod example_plugin_group;
#[allow(unused_imports)]
pub use self::example_plugin_group::*;
pub mod example_replicate_plugin;
#[allow(unused_imports)]
pub use self::example_replicate_plugin::*;

0 comments on commit e2954ba

Please sign in to comment.