Faster dagger rotation and skill direction change
This commit is contained in:
parent
5f4140fb6f
commit
2c803da0cd
|
@ -30,7 +30,7 @@ onDaggerRender(Sprite *s)
|
||||||
if (!timer_started(s->renderTimer))
|
if (!timer_started(s->renderTimer))
|
||||||
timer_start(s->renderTimer);
|
timer_start(s->renderTimer);
|
||||||
|
|
||||||
if (timer_get_ticks(s->renderTimer) > 100) {
|
if (timer_get_ticks(s->renderTimer) > 60) {
|
||||||
timer_start(s->renderTimer);
|
timer_start(s->renderTimer);
|
||||||
s->clip.x += 16;
|
s->clip.x += 16;
|
||||||
s->clip.x = s->clip.x % 64;
|
s->clip.x = s->clip.x % 64;
|
||||||
|
|
|
@ -138,6 +138,8 @@ skill_throw_dagger(Skill *skill, SkillData *data)
|
||||||
else
|
else
|
||||||
p->velocity = (Vector2d) { -DAGGER_VELOCITY, 0 };
|
p->velocity = (Vector2d) { -DAGGER_VELOCITY, 0 };
|
||||||
|
|
||||||
|
set_player_clip_for_direction(data->player, &data->direction);
|
||||||
|
|
||||||
mixer_play_effect(SWOOSH);
|
mixer_play_effect(SWOOSH);
|
||||||
p->sprite->pos = data->player->sprite->pos;
|
p->sprite->pos = data->player->sprite->pos;
|
||||||
linkedlist_append(&data->player->projectiles, p);
|
linkedlist_append(&data->player->projectiles, p);
|
||||||
|
|
Loading…
Reference in New Issue