refactor(): minor tweaks & cleanups
This commit is contained in:
parent
6b769e1ba1
commit
cf6af7b3ef
|
@ -2,14 +2,12 @@ pub mod physics_replace_proxies;
|
|||
pub use physics_replace_proxies::*;
|
||||
|
||||
pub mod utils;
|
||||
pub(crate) use utils::*;
|
||||
|
||||
pub mod controls;
|
||||
pub use controls::*;
|
||||
|
||||
use bevy::prelude::*;
|
||||
// use crate::state::{GameState};
|
||||
use crate::Collider;
|
||||
// use crate::Collider;
|
||||
pub struct PhysicsPlugin;
|
||||
impl Plugin for PhysicsPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use bevy::prelude::*;
|
||||
use bevy::render::primitives::Aabb;
|
||||
// use bevy::render::primitives::Aabb;
|
||||
use bevy_rapier3d::geometry::Collider as RapierCollider;
|
||||
use bevy_rapier3d::dynamics::RigidBody as RapierRigidBody;
|
||||
use bevy_rapier3d::prelude::{ComputedColliderShape, ActiveEvents, ActiveCollisionTypes};
|
||||
|
|
|
@ -3,17 +3,12 @@ use core::ops::Deref;
|
|||
|
||||
use serde_json::Value;
|
||||
use serde::de::DeserializeSeed;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
||||
use bevy::prelude::*;
|
||||
use bevy::reflect::serde::{UntypedReflectDeserializer, ReflectSerializer};
|
||||
use bevy::reflect::TypeRegistryInternal;
|
||||
use bevy::gltf::{Gltf, GltfExtras};
|
||||
|
||||
use crate::Player;
|
||||
use crate::camera::{CameraTracking, CameraTrackingOffset};
|
||||
|
||||
use super::capitalize_first_letter;
|
||||
|
||||
pub fn gltf_extras_to_components(
|
||||
|
@ -120,7 +115,7 @@ pub fn gltf_extras_to_components(
|
|||
type_registry: &TypeRegistryInternal
|
||||
) -> Vec<Box<dyn Reflect>> {
|
||||
println!("RON string {}", ron_string);
|
||||
let lookup: HashMap<String, Value> = ron::from_str(ron_string.as_str()).unwrap(); //serde_json::from_str(ron_string.as_str()).unwrap();
|
||||
let lookup: HashMap<String, Value> = ron::from_str(ron_string.as_str()).unwrap();
|
||||
let mut components: Vec<Box<dyn Reflect>> = Vec::new();
|
||||
for (key, value) in lookup.into_iter() {
|
||||
println!("KEY {} , VALUE {}", key, value);
|
||||
|
@ -148,7 +143,7 @@ pub fn gltf_extras_to_components(
|
|||
}
|
||||
}
|
||||
|
||||
let mut ron_string = format!("
|
||||
let ron_string = format!("
|
||||
{{
|
||||
\"{}\":{}
|
||||
}}",
|
||||
|
|
|
@ -6,7 +6,6 @@ use bevy::prelude::*;
|
|||
pub struct EcsRelationshipsPlugin;
|
||||
impl Plugin for EcsRelationshipsPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
app
|
||||
;
|
||||
app;
|
||||
}
|
||||
}
|
|
@ -63,14 +63,13 @@ pub fn test_collision_events(
|
|||
mut contact_force_events: EventReader<ContactForceEvent>,
|
||||
)
|
||||
{
|
||||
|
||||
for collision_event in collision_events.iter() {
|
||||
println!("collision");
|
||||
match collision_event {
|
||||
CollisionEvent::Started(entity1, entity2 ,_) => {
|
||||
CollisionEvent::Started(_entity1, _entity2 ,_) => {
|
||||
println!("collision started")
|
||||
}
|
||||
CollisionEvent::Stopped(entity1, entity2 ,_) => {
|
||||
CollisionEvent::Stopped(_entity1, _entity2 ,_) => {
|
||||
println!("collision ended")
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue