place buildings
This commit is contained in:
parent
b8c34a37b6
commit
2808f6dd2c
14 changed files with 338 additions and 36 deletions
|
|
@ -10,9 +10,9 @@ use bevy::{
|
|||
render::camera::Exposure,
|
||||
};
|
||||
use building_core::SpawnCore;
|
||||
use building_impaler::SpawnImpaler;
|
||||
use camera::ControlledCamera;
|
||||
use inhabitant_coranth::SpawnCoranth;
|
||||
use physics::Ground;
|
||||
use state::AppState;
|
||||
|
||||
pub struct LevelPlugin;
|
||||
|
|
@ -28,7 +28,6 @@ fn setup(
|
|||
mut meshes: ResMut<Assets<Mesh>>,
|
||||
mut materials: ResMut<Assets<StandardMaterial>>,
|
||||
mut core_writer: EventWriter<SpawnCore>,
|
||||
mut impaler_writer: EventWriter<SpawnImpaler>,
|
||||
mut coranth_writer: EventWriter<SpawnCoranth>,
|
||||
) {
|
||||
let level_size = 50.0;
|
||||
|
|
@ -43,6 +42,8 @@ fn setup(
|
|||
perceptual_roughness: 0.8,
|
||||
..default()
|
||||
})),
|
||||
PhysicsPickable,
|
||||
Ground,
|
||||
));
|
||||
|
||||
for y in 5..15 {
|
||||
|
|
@ -54,9 +55,6 @@ fn setup(
|
|||
core_writer.write(SpawnCore {
|
||||
transform: Transform::from_xyz(5.0, 1.0, 5.0),
|
||||
});
|
||||
impaler_writer.write(SpawnImpaler {
|
||||
transform: Transform::from_xyz(-5.0, 0.5, 5.0),
|
||||
});
|
||||
|
||||
// Light
|
||||
commands.spawn((
|
||||
|
|
@ -83,6 +81,7 @@ fn setup(
|
|||
Atmosphere::EARTH,
|
||||
Exposure::SUNLIGHT,
|
||||
Bloom::NATURAL,
|
||||
PhysicsPickable,
|
||||
Transform::from_xyz(-2.5, 9.5, 9.0).looking_at(Vec3::ZERO, Dir3::Y),
|
||||
));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue