roof and no red boxes

This commit is contained in:
LorrensP-2158466
2025-04-06 23:18:08 +02:00
parent 8c5081b2dc
commit 3ca0db21b4
2 changed files with 13 additions and 24 deletions

View File

@@ -116,12 +116,11 @@ fn spawn_level(
Transform::from_xyz(-500.0, 0.0, -500.0), Transform::from_xyz(-500.0, 0.0, -500.0),
)); ));
// huge roof // huge roof
// commands.spawn(( commands.spawn((
// RigidBody::Fixed, RigidBody::Fixed,
// Collider::cuboid(1000.0, 0.1, 1000.0), Collider::cuboid(1000.0, 0.1, 1000.0),
// Transform::from_xyz(-500.0, 3.0, -500.0), Transform::from_xyz(-500.0, 3.0, -500.0),
// )); ));
// let map = GameMap::test();
let levels = create_levels(3); let levels = create_levels(3);
@@ -343,12 +342,6 @@ fn spawn_level(
}); });
} }
} }
let (x, z) = level.end_node;
commands.spawn((
Mesh3d(meshes.add(Cuboid::new(1.0, 20.0, 1.0))),
MeshMaterial3d(materials.add(Color::srgb_u8(255, 0, 0))),
Transform::from_xyz(2.0 * x as f32, 0.5, -2.0 * z as f32),
));
} }
commands.insert_resource(GameLevels { levels }); commands.insert_resource(GameLevels { levels });
} }

View File

@@ -1,5 +1,5 @@
use asset_loading::{AudioAssets, ImageAssets}; use asset_loading::{AudioAssets, ImageAssets};
use bevy::{prelude::*}; use bevy::prelude::*;
use bevy_kira_audio::{Audio, AudioControl}; use bevy_kira_audio::{Audio, AudioControl};
use bevy_rapier3d::prelude::*; use bevy_rapier3d::prelude::*;
@@ -9,9 +9,9 @@ mod debugging;
mod interaction; mod interaction;
mod level_instantiation; mod level_instantiation;
mod main_menu; mod main_menu;
mod monster;
mod player; mod player;
mod util; mod util;
mod monster;
fn main() { fn main() {
App::new() App::new()
@@ -81,17 +81,13 @@ fn setup(
// )); // ));
} }
fn play_song( fn play_song(audio_assets: Res<AudioAssets>, audio: Res<Audio>) {
audio_assets: Res<AudioAssets>, audio
audio: Res<Audio>, .play(audio_assets.theme_song.clone())
) { .looped()
audio.play(audio_assets.theme_song.clone()) .with_volume(0.20);
.looped()
.with_volume(0.20);
} }
fn stop_song( fn stop_song(audio: Res<Audio>) {
audio: Res<Audio>,
) {
audio.stop(); audio.stop();
} }