Skip to content

Commit

Permalink
Most of clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
mwbryant committed Apr 21, 2023
1 parent 5a87154 commit 55100b1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
wasm/bevy_game*
wasm/assets
*.blend
*.blend1
*.blend1
assets/3d/raw/
Binary file added assets/3d/sign.glb
Binary file not shown.
12 changes: 11 additions & 1 deletion src/bin/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn main() {
app.run();
}

fn setup(mut commands: Commands) {
fn setup(mut commands: Commands, assets: Res<AssetServer>) {
// directional 'sun' light
commands.spawn(DirectionalLightBundle {
directional_light: DirectionalLight {
Expand Down Expand Up @@ -82,6 +82,16 @@ fn setup(mut commands: Commands) {
Name::new("Player"),
));

commands.spawn((
SceneBundle {
scene: assets.load("3d/sign.glb#Scene0"),
transform: Transform::from_xyz(-2.0, 0.0, 0.0),
..Default::default()
},
Name::new("Sign"),
OverworldEntity,
));

/*
commands.spawn((
SpriteBundle {
Expand Down
10 changes: 1 addition & 9 deletions src/combat/graphic_effects.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use bevy_inspector_egui::egui::epaint::text;

use crate::prelude::*;

pub struct GraphicEffectsPlugin;
Expand Down Expand Up @@ -27,7 +25,6 @@ fn add_death_animation(mut commands: Commands, mut death_event: EventReader<Deat
fn projectile_particles(
mut commands: Commands,
assets: Res<AssetServer>,
mut texture_atlases: ResMut<Assets<TextureAtlas>>,
projectiles: Query<(Entity, &Transform), With<Projectile>>,
mut projectile_emitter: Query<
(
Expand Down Expand Up @@ -91,7 +88,6 @@ fn projectile_particles(
fn spawn_hit_particles(
mut commands: Commands,
assets: Res<AssetServer>,
mut texture_atlases: ResMut<Assets<TextureAtlas>>,
mut hit_event: EventReader<HitEvent>,
target: Query<&Transform>,
) {
Expand Down Expand Up @@ -123,11 +119,7 @@ fn spawn_hit_particles(
}
}

fn spawn_player_win_particles(
mut commands: Commands,
assets: Res<AssetServer>,
mut texture_atlases: ResMut<Assets<TextureAtlas>>,
) {
fn spawn_player_win_particles(mut commands: Commands, assets: Res<AssetServer>) {
let texture_handle = assets.load("my_art/particles.png");

let particle_desc = ParticleDesc {
Expand Down

0 comments on commit 55100b1

Please sign in to comment.