update project
This commit is contained in:
@@ -16,8 +16,10 @@ use bevy_rapier3d::prelude::*;
|
||||
#[derive(Default)]
|
||||
pub struct GamePlugin;
|
||||
|
||||
impl Plugin for GamePlugin {
|
||||
fn build(&self, app: &mut bevy::app::App) {
|
||||
impl Plugin for GamePlugin
|
||||
{
|
||||
fn build(&self, app: &mut bevy::app::App)
|
||||
{
|
||||
app.add_plugins((
|
||||
FollowCamPlugin,
|
||||
CameraPlugin,
|
||||
@@ -40,8 +42,9 @@ fn setup_scene(
|
||||
mut commands: Commands,
|
||||
mut meshes: ResMut<Assets<Mesh>>,
|
||||
mut materials: ResMut<Assets<StandardMaterial>>,
|
||||
mut window: Single<&mut Window, With<PrimaryWindow>>,
|
||||
) {
|
||||
mut window: Single<&mut CursorOptions, With<PrimaryWindow>>,
|
||||
)
|
||||
{
|
||||
window.cursor_options.visible = false;
|
||||
window.cursor_options.grab_mode = CursorGrabMode::Locked;
|
||||
|
||||
@@ -105,11 +108,8 @@ fn setup_scene(
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn spawn_ship(
|
||||
mut commands: Commands,
|
||||
mut meshes: ResMut<Assets<Mesh>>,
|
||||
mut materials: ResMut<Assets<StandardMaterial>>,
|
||||
) {
|
||||
fn spawn_ship(mut commands: Commands, mut meshes: ResMut<Assets<Mesh>>, mut materials: ResMut<Assets<StandardMaterial>>)
|
||||
{
|
||||
let window_material = materials.add(Color::linear_rgba(1.0, 0.0, 1.0, 0.5));
|
||||
|
||||
let material = materials.add(Color::BLACK);
|
||||
|
||||
Reference in New Issue
Block a user