State+Scene Transititions

This commit is contained in:
2025-07-05 16:04:43 -04:00
parent a62002ee8b
commit bc0ef5fbfa
14 changed files with 145 additions and 66 deletions

View File

@@ -9,7 +9,7 @@ use crate::{
player::{GravityDirection, JumpSpeed, MoveSpeed, PlayerDrag, PlayerForce, PlayerMotion, PlayerVelocity},
tags::Player,
},
states::input::PlayerInputSystems,
states::{input::PlayerInputSystems, play::PlaySystems},
utils::{input::get_mouse_delta, rotation::get_alignment_rotation_preserve_twist},
};
@@ -18,8 +18,13 @@ pub struct PlayerPlugin;
impl Plugin for PlayerPlugin {
fn build(&self, app: &mut App) {
app.add_systems(PreUpdate, (keyboard_input, player_look).in_set(PlayerInputSystems));
app.add_systems(Update, (apply_gravity, apply_forces, apply_motion, apply_drag).chain());
app.add_systems(Update, align_with_gravity);
app.add_systems(
Update,
(apply_gravity, apply_forces, apply_motion, apply_drag)
.chain()
.in_set(PlaySystems),
);
app.add_systems(Update, align_with_gravity.in_set(PlaySystems));
}
}