From b6fa54a99c8ba0a30bdb98f0276eab726eec1af7 Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Tue, 1 Mar 2022 22:31:44 -0800 Subject: [PATCH] Minor tidy. --- src/colliders.rs | 4 ++-- src/geometry.rs | 8 ++++---- src/glamor.rs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/colliders.rs b/src/colliders.rs index dae6aad..0c910ea 100644 --- a/src/colliders.rs +++ b/src/colliders.rs @@ -4,7 +4,7 @@ use bevy::{ }; use bevy_rapier3d::prelude::*; -use crate::geometry::{CyberBikeModel, CyberSphere, PLANET_RADIUS, SPAWN_ALTITUDE}; +use crate::geometry::{CyberBikeModel, CyberPlanet, PLANET_RADIUS, SPAWN_ALTITUDE}; #[derive(Component)] pub struct CyberBikeBody; @@ -15,7 +15,7 @@ pub struct CyberBikeCollider; fn setup_colliders( mut commands: Commands, meshes: Res>, - planet_query: Query<(Entity, &Handle), With>, + planet_query: Query<(Entity, &Handle), With>, bike_query: Query<(Entity, &Transform), With>, ) { let (planet, mesh_handle) = planet_query.single(); diff --git a/src/geometry.rs b/src/geometry.rs index 04cf20f..a481b89 100644 --- a/src/geometry.rs +++ b/src/geometry.rs @@ -15,9 +15,9 @@ pub(crate) const SPAWN_ALTITUDE: f32 = PLANET_RADIUS * 1.015; pub struct CyberBikeModel; #[derive(Component)] -pub struct CyberSphere; +pub struct CyberPlanet; -fn spawn_giant_sphere( +fn spawn_planet( mut commands: Commands, mut meshes: ResMut>, mut materials: ResMut>, @@ -43,7 +43,7 @@ fn spawn_giant_sphere( ..Default::default() }) - .insert(CyberSphere); + .insert(CyberPlanet); } fn spawn_cyberbike(mut commands: Commands, asset_server: Res) { @@ -65,7 +65,7 @@ fn spawn_cyberbike(mut commands: Commands, asset_server: Res) { pub struct CyberGeomPlugin; impl Plugin for CyberGeomPlugin { fn build(&self, app: &mut App) { - app.add_startup_system(spawn_giant_sphere.label(Label::Geometry)) + app.add_startup_system(spawn_planet.label(Label::Geometry)) .add_startup_system(spawn_cyberbike.label(Label::Geometry)); } } diff --git a/src/glamor.rs b/src/glamor.rs index 1f8eb0c..9ef6dde 100644 --- a/src/glamor.rs +++ b/src/glamor.rs @@ -10,7 +10,7 @@ use bevy::{ use bevy_polyline::{Polyline, PolylineBundle, PolylineMaterial, PolylinePlugin}; use rand::{thread_rng, Rng}; -use crate::{geometry::CyberSphere, lights::AnimateCyberLightWireframe}; +use crate::{geometry::CyberPlanet, lights::AnimateCyberLightWireframe}; pub const BISEXY_COLOR: Color = Color::hsla(292.0, 0.9, 0.60, 1.1); @@ -19,7 +19,7 @@ fn wireframe_planet( mut meshes: ResMut>, mut polylines: ResMut>, mut polymats: ResMut>, - query: Query<&Handle, With>, + query: Query<&Handle, With>, ) { let handle = query.single(); let mesh = meshes.get_mut(handle).unwrap();