feat: tweaked player light attack chain and slide characteristics
This commit is contained in:
parent
27fbda2c6d
commit
526ff0b0c6
|
@ -100,7 +100,7 @@ const State* PlayerJabA_Update(Player* self, float deltaTime) {
|
||||||
.damageAmount = 1,
|
.damageAmount = 1,
|
||||||
.knockdown = 0,
|
.knockdown = 0,
|
||||||
.stun = 0.15f,
|
.stun = 0.15f,
|
||||||
.knockback = 0.07f,
|
.knockback = 7.0f,
|
||||||
};
|
};
|
||||||
const float ntime = animation_sprite_get_time_normalized(self->currentAnimation);
|
const float ntime = animation_sprite_get_time_normalized(self->currentAnimation);
|
||||||
if(self->animationTriggers == 0 && ntime > 0.33f) {
|
if(self->animationTriggers == 0 && ntime > 0.33f) {
|
||||||
|
@ -131,7 +131,7 @@ const State* PlayerJabB_Update(Player* self, float deltaTime) {
|
||||||
.damageAmount = 1,
|
.damageAmount = 1,
|
||||||
.knockdown = 0,
|
.knockdown = 0,
|
||||||
.stun = 0.15f,
|
.stun = 0.15f,
|
||||||
.knockback = 0.05f,
|
.knockback = 7.0f,
|
||||||
};
|
};
|
||||||
const float ntime = animation_sprite_get_time_normalized(self->currentAnimation);
|
const float ntime = animation_sprite_get_time_normalized(self->currentAnimation);
|
||||||
const size_t frame = sprite_get_tile(self->sprite);
|
const size_t frame = sprite_get_tile(self->sprite);
|
||||||
|
@ -156,10 +156,10 @@ void PlayerKickA_Enter(Player* self) {
|
||||||
|
|
||||||
const State* PlayerKickA_Update(Player* self, float deltaTime) {
|
const State* PlayerKickA_Update(Player* self, float deltaTime) {
|
||||||
static const DamageEventData damage = {
|
static const DamageEventData damage = {
|
||||||
.damageAmount = 3,
|
.damageAmount = 2,
|
||||||
.knockdown = 1,
|
.knockdown = 1,
|
||||||
.stun = 0.5f,
|
.stun = 0.5f,
|
||||||
.knockback = 0.15f,
|
.knockback = 15.0f,
|
||||||
};
|
};
|
||||||
const float ntime = animation_sprite_get_time_normalized(self->currentAnimation);
|
const float ntime = animation_sprite_get_time_normalized(self->currentAnimation);
|
||||||
const size_t frame = sprite_get_tile(self->sprite);
|
const size_t frame = sprite_get_tile(self->sprite);
|
||||||
|
@ -186,15 +186,18 @@ const State* PlayerSlide_Update(Player* self, float deltaTime) {
|
||||||
static const DamageEventData damage = {
|
static const DamageEventData damage = {
|
||||||
.damageAmount = 3,
|
.damageAmount = 3,
|
||||||
.knockdown = 1,
|
.knockdown = 1,
|
||||||
.stun = 1.f,
|
.stun = 0.1f,
|
||||||
.knockback = 0.3f,
|
.knockback = 17.0f,
|
||||||
};
|
};
|
||||||
|
static const float duration = 0.2f;
|
||||||
|
static const float speed = 4.f;
|
||||||
const float time = animation_sprite_get_time(self->currentAnimation);
|
const float time = animation_sprite_get_time(self->currentAnimation);
|
||||||
rigidbody_set_velocity(self->rigidbody, MakeVector(self->facing * 3.f, -0.05f));
|
rigidbody_set_velocity(self->rigidbody, MakeVector(self->facing * speed, -0.05f));
|
||||||
if(time > 0.34f)
|
if(time > duration)
|
||||||
return PlayerIdle();
|
return PlayerIdle();
|
||||||
if(time > 0.1f)
|
if(time > 0.1f) {
|
||||||
PlayerHurtbox(self, damage, MakeVector(0.16, 0.06f), MakeVector(0.33f, -0.03f));
|
PlayerHurtbox(self, damage, MakeVector(0.2f, 0.15f), MakeVector(0.21f, -0.6f));
|
||||||
|
}
|
||||||
return PlayerSlide();
|
return PlayerSlide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue