State+Scene Transititions
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user