use crate::game::*; use bevy::prelude::*; use bevy_rapier2d::prelude::*; pub fn setup( commands: &mut Commands, character_meshes: &Res, materials: &mut ResMut>, audio: &Res>, ) { commands .spawn_bundle(TransformBundle::from(Transform::from_xyz(0.0, -256.0, 0.0))) .insert(Collider::cuboid(400., 10.)) .insert(Level); commands .spawn_bundle(TransformBundle::from(Transform::from_xyz( 256.0, -128.0, 0.0, ))) .insert(Collider::cuboid(200., 10.)) .insert(Level); spawn_character( commands, character_meshes, materials, audio, Transform::from_xyz(128., 64., 0.), Color::BLUE, true, ); spawn_character( commands, character_meshes, materials, audio, Transform::from_xyz(-128., -128., 0.), Color::RED, false, ); spawn_character( commands, character_meshes, materials, audio, Transform::from_xyz(0., -128., 0.), Color::GREEN, false, ); }