aboutsummaryrefslogtreecommitdiffstats
path: root/src/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.rs')
-rw-r--r--src/client.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client.rs b/src/client.rs
index 12f12c0..d536dce 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -230,9 +230,9 @@ fn render_projectiles(
mut commands: Commands,
mut materials: ResMut<Assets<ColorMaterial>>,
mut meshes: ResMut<Assets<Mesh>>,
- projectiles: Query<(Entity, &Projectile), Added<Projectile>>,
+ projectiles: Query<(Entity, &Projectile, &ProjectileColor), Added<Projectile>>,
) {
- for (entity, projectile) in projectiles.iter() {
+ for (entity, projectile, projectile_color) in projectiles.iter() {
let Some(position) = (match projectile.type_ {
ProjectileType::Free(FreeProjectile { position, .. }) => Some(position),
ProjectileType::Instant(InstantProjectile { .. }) => None,
@@ -241,8 +241,8 @@ fn render_projectiles(
continue;
};
commands.entity(entity).insert(MaterialMesh2dBundle {
- mesh: Mesh2dHandle(meshes.add(Circle { radius: 2. })),
- material: materials.add(Color::RED),
+ mesh: Mesh2dHandle(meshes.add(Circle { radius: 1. })),
+ material: materials.add(projectile_color.0),
transform: Transform::from_xyz(position.x, position.y, 1.),
..Default::default()
});