feat: graphics improvement and a new section of the level
This commit is contained in:
parent
d6e2881c52
commit
7af00521df
23 changed files with 1247 additions and 136 deletions
|
|
@ -31,9 +31,10 @@ void StandingState::physics_process(double delta) {
|
|||
|
||||
PlayerState::StateID RunningState::get_next_state() const {
|
||||
Vector3 const velocity{this->get_body()->get_velocity()};
|
||||
Vector3 const desired{this->get_body()->get_desired_velocity()};
|
||||
if(!this->get_body()->is_on_floor()) {
|
||||
return FallingState::get_class_static();
|
||||
} else if(Vector2{velocity.x, velocity.z}.is_zero_approx()) {
|
||||
} else if(Vector2{velocity.x, velocity.z}.is_zero_approx() && desired.is_zero_approx()) {
|
||||
return StandingState::get_class_static();
|
||||
} else if(Input::get_singleton()->is_action_just_pressed(PlayerBody::split_step_action) && this->get_body()->get_velocity().length() > this->get_body()->get_min_step_speed()) {
|
||||
return SplitStepState::get_class_static();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue