|
|
|
@ -1,8 +1,7 @@
|
|
|
|
// Bevy basically forces "complex types" with Querys
|
|
|
|
// Bevy basically forces "complex types" with Querys
|
|
|
|
#![allow(clippy::type_complexity)]
|
|
|
|
#![allow(clippy::type_complexity)]
|
|
|
|
|
|
|
|
|
|
|
|
use bevy::color::palettes::tailwind::FUCHSIA_950;
|
|
|
|
use bevy::render::view::ColorGrading;
|
|
|
|
use bevy::render::view::{ColorGrading, ColorGradingGlobal};
|
|
|
|
|
|
|
|
use games::physics2d::*;
|
|
|
|
use games::physics2d::*;
|
|
|
|
use games::*;
|
|
|
|
use games::*;
|
|
|
|
use std::hash::BuildHasher;
|
|
|
|
use std::hash::BuildHasher;
|
|
|
|
@ -831,7 +830,6 @@ fn manage_score(
|
|
|
|
/// This includes root batch entities as well as pipes and hitboxes
|
|
|
|
/// This includes root batch entities as well as pipes and hitboxes
|
|
|
|
fn move_batches(
|
|
|
|
fn move_batches(
|
|
|
|
mut start: EventReader<CollisionStarted>,
|
|
|
|
mut start: EventReader<CollisionStarted>,
|
|
|
|
bird: Query<Entity, With<Bird>>,
|
|
|
|
|
|
|
|
hitboxes: Query<Entity, With<Hitbox>>,
|
|
|
|
hitboxes: Query<Entity, With<Hitbox>>,
|
|
|
|
batches: Query<(Entity, &Batch)>,
|
|
|
|
batches: Query<(Entity, &Batch)>,
|
|
|
|
state: Res<State<PlayerState>>,
|
|
|
|
state: Res<State<PlayerState>>,
|
|
|
|
@ -901,7 +899,7 @@ fn debug_trail(
|
|
|
|
mut positions: Local<HashMap<Entity, VecDeque<Vec3>>>,
|
|
|
|
mut positions: Local<HashMap<Entity, VecDeque<Vec3>>>,
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
physics_objects.iter_mut().for_each(|(e, obj)| {
|
|
|
|
physics_objects.iter_mut().for_each(|(e, obj)| {
|
|
|
|
if let Some(mut list) = positions.get_mut(&e) {
|
|
|
|
if let Some(list) = positions.get_mut(&e) {
|
|
|
|
list.push_front(obj.translation);
|
|
|
|
list.push_front(obj.translation);
|
|
|
|
if list.len() > 60 {
|
|
|
|
if list.len() > 60 {
|
|
|
|
list.pop_back();
|
|
|
|
list.pop_back();
|
|
|
|
|