From 42c0f017348ef2033b6889b272f31f0c5eb5d41d Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Sun, 21 Mar 2021 17:16:19 +0100 Subject: added twinkling stars --- src/main.rs | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 5577a11..bab21a0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ use bevy::prelude::*; use gems::constants; use rand::{ distributions::{Distribution, Standard}, - Rng, + thread_rng, Rng, }; #[derive(Debug, PartialEq, Clone, Copy)] @@ -177,6 +177,33 @@ fn cell_check_system(mut cell_query: Query<(&mut Cell, &mut TextureAtlasSprite)> } } +fn star_spawning_system(commands: &mut Commands, time: Res