mirror of
https://codeberg.org/schrottkatze/mgd2-tram-championships.git
synced 2025-06-14 03:27:39 +00:00
do a basic scene and way too much organization and fail to implement panning
This commit is contained in:
parent
08069c9224
commit
6d269d0c14
6 changed files with 156 additions and 29 deletions
25
src/game/scene.rs
Normal file
25
src/game/scene.rs
Normal file
|
@ -0,0 +1,25 @@
|
|||
use bevy::prelude::*;
|
||||
|
||||
use crate::cleanup;
|
||||
|
||||
const NORMALSPUR: f32 = 1.435;
|
||||
|
||||
pub fn setup(
|
||||
mut c: Commands,
|
||||
mut meshes: ResMut<Assets<Mesh>>,
|
||||
mut materials: ResMut<Assets<StandardMaterial>>,
|
||||
) {
|
||||
// spawn in floor plane
|
||||
c.spawn((
|
||||
Mesh3d(meshes.add(Plane3d::default().mesh().size(128., 128.))),
|
||||
MeshMaterial3d(materials.add(Color::srgb(0.3, 0.8, 0.4))),
|
||||
cleanup::Scene,
|
||||
));
|
||||
|
||||
// track (temporary)
|
||||
c.spawn((
|
||||
Mesh3d(meshes.add(Cuboid::new(NORMALSPUR, 0.25, 96.))),
|
||||
MeshMaterial3d(materials.add(Color::BLACK)),
|
||||
cleanup::Scene,
|
||||
));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue