feat: added some outward velocity to sliding
This commit is contained in:
parent
92bf07d050
commit
25badcb847
|
@ -190,7 +190,7 @@ const State* PlayerSlide_Update(Player* self, float deltaTime) {
|
|||
.knockback = 0.3f,
|
||||
};
|
||||
const float time = animation_sprite_get_time(self->currentAnimation);
|
||||
rigidbody_set_velocity(self->rigidbody, MakeVector(self->facing * 3.f, 0.f));
|
||||
rigidbody_set_velocity(self->rigidbody, MakeVector(self->facing * 3.f, -0.05f));
|
||||
if(time > 0.34f)
|
||||
return PlayerIdle();
|
||||
if(time > 0.1f)
|
||||
|
@ -200,6 +200,7 @@ const State* PlayerSlide_Update(Player* self, float deltaTime) {
|
|||
|
||||
void PlayerJump_Enter(Player* self) {
|
||||
if(self->jumpInput) {
|
||||
self->jumpInput = 0;
|
||||
self->currentAnimation = self->jump;
|
||||
self->verticalVelocity = 3.f;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue