ninja ulti

This commit is contained in:
nemo 2024-10-01 14:57:17 +02:00
parent 9a0afc9941
commit 2b6326c803
1 changed files with 11 additions and 0 deletions

11
ninja.c
View File

@ -39,6 +39,17 @@ Vector2 ninja_dash(Vector2 pos, Vector2 to, float sec)
scale.y *= dist;
target = Vector2Add(pos, scale);
}
if (main_attack_cooldown <= EPSILON && key_pressed(KC_ULTI)) {
sec *= 3;
main_attack_cooldown = sec + 0.069;
dash_time = sec;
Vector2 diff = Vector2Subtract(to, pos);
Vector2 scale = Vector2Normalize(diff);
int dist = 400;
scale.x *= dist;
scale.y *= dist;
target = Vector2Add(pos, scale);
}
if (dash_time > EPSILON) {
float dt = GetFrameTime();
dash_time -= dt;