From 96dea15ebefb030188e46f7dd35c76e4adc785a1 Mon Sep 17 00:00:00 2001 From: Uggla Date: Tue, 30 Apr 2024 12:15:23 +0200 Subject: [PATCH] refactor: Small cleanup and renaming --- Cargo.lock | 2 +- src/collision.rs | 4 ++-- src/state.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f9b93da..810c75f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3268,7 +3268,7 @@ checksum = "cbf4a6aa5f6d6888f39e980649f3ad6b666acdce1d78e95b8a2cb076e687ae30" [[package]] name = "rock_run" -version = "0.2.0" +version = "0.1.0" dependencies = [ "bevy", "bevy_ecs_tilemap", diff --git a/src/collision.rs b/src/collision.rs index e930d4f..d2f0968 100644 --- a/src/collision.rs +++ b/src/collision.rs @@ -13,10 +13,10 @@ pub struct CollisionState; impl Plugin for CollisionPlugin { fn build(&self, app: &mut App) { - app.add_systems(Update, player_ground.in_set(CollisionState)); + app.add_systems(Update, player_collision.in_set(CollisionState)); } } -fn player_ground( +fn player_collision( controllers: Query<(Entity, &KinematicCharacterControllerOutput), With>, state: Res>, mut next_state: ResMut>, diff --git a/src/state.rs b/src/state.rs index f78135a..474af87 100644 --- a/src/state.rs +++ b/src/state.rs @@ -7,7 +7,7 @@ pub struct ForState { pub states: Vec, } -// Main state enum, differianting, Menu from Game 'scenes' +// Main state enum #[derive(States, Debug, Copy, Clone, Hash, Eq, PartialEq, Default, Sequence)] pub enum AppState { #[default]