From b20579f22bbc5e92dd7112f5afa9ed5d90ee50f9 Mon Sep 17 00:00:00 2001 From: WanderingPenwing Date: Mon, 7 Oct 2024 22:25:58 +0200 Subject: [PATCH] explore constellations --- src/explo_state.rs | 18 ++++++++++++------ src/game_state.rs | 16 ++++++++-------- src/main.rs | 26 ++++++++++---------------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/explo_state.rs b/src/explo_state.rs index a19652f..eaea51d 100644 --- a/src/explo_state.rs +++ b/src/explo_state.rs @@ -2,13 +2,19 @@ use bevy::prelude::*; use crate::Player; use crate::GameState; +use crate::Sky; +use crate::spawn_cons_lines; -// pub fn setup ( -// -// ) { -// for -// spawn_cons_lines(commands, meshes, materials, sky, target_cons.clone()); -// } +pub fn setup ( + sky : Res, + mut commands: Commands, + mut meshes: ResMut>, + mut materials: ResMut>, +) { + for constellation in sky.content.iter() { + spawn_cons_lines(&mut commands, &mut meshes, &mut materials, constellation.clone()); + } +} pub fn player_mouse_move ( buttons: Res>, diff --git a/src/game_state.rs b/src/game_state.rs index e5744dd..54687be 100644 --- a/src/game_state.rs +++ b/src/game_state.rs @@ -206,10 +206,10 @@ pub fn player_interact( text_query: Query<&mut Text, With>, button_query: Query<(&mut BackgroundColor, &mut BorderColor), With