roof and no red boxes
This commit is contained in:
@@ -116,12 +116,11 @@ fn spawn_level(
|
||||
Transform::from_xyz(-500.0, 0.0, -500.0),
|
||||
));
|
||||
// huge roof
|
||||
// commands.spawn((
|
||||
// RigidBody::Fixed,
|
||||
// Collider::cuboid(1000.0, 0.1, 1000.0),
|
||||
// Transform::from_xyz(-500.0, 3.0, -500.0),
|
||||
// ));
|
||||
// let map = GameMap::test();
|
||||
commands.spawn((
|
||||
RigidBody::Fixed,
|
||||
Collider::cuboid(1000.0, 0.1, 1000.0),
|
||||
Transform::from_xyz(-500.0, 3.0, -500.0),
|
||||
));
|
||||
|
||||
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 });
|
||||
}
|
||||
|
||||
20
src/main.rs
20
src/main.rs
@@ -1,5 +1,5 @@
|
||||
use asset_loading::{AudioAssets, ImageAssets};
|
||||
use bevy::{prelude::*};
|
||||
use bevy::prelude::*;
|
||||
use bevy_kira_audio::{Audio, AudioControl};
|
||||
use bevy_rapier3d::prelude::*;
|
||||
|
||||
@@ -9,9 +9,9 @@ mod debugging;
|
||||
mod interaction;
|
||||
mod level_instantiation;
|
||||
mod main_menu;
|
||||
mod monster;
|
||||
mod player;
|
||||
mod util;
|
||||
mod monster;
|
||||
|
||||
fn main() {
|
||||
App::new()
|
||||
@@ -81,17 +81,13 @@ fn setup(
|
||||
// ));
|
||||
}
|
||||
|
||||
fn play_song(
|
||||
audio_assets: Res<AudioAssets>,
|
||||
audio: Res<Audio>,
|
||||
) {
|
||||
audio.play(audio_assets.theme_song.clone())
|
||||
.looped()
|
||||
.with_volume(0.20);
|
||||
fn play_song(audio_assets: Res<AudioAssets>, audio: Res<Audio>) {
|
||||
audio
|
||||
.play(audio_assets.theme_song.clone())
|
||||
.looped()
|
||||
.with_volume(0.20);
|
||||
}
|
||||
|
||||
fn stop_song(
|
||||
audio: Res<Audio>,
|
||||
) {
|
||||
fn stop_song(audio: Res<Audio>) {
|
||||
audio.stop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user