From b77e956fc98435a6fb62559f18f1d50b132a829b Mon Sep 17 00:00:00 2001 From: Maxime Havez <56996234+Omonom47@users.noreply.github.com> Date: Sat, 13 Jul 2024 11:25:59 +0200 Subject: [PATCH] added missing line of code --- ~Documentation/topics/Opgave-2-Kollision.md | 1 + 1 file changed, 1 insertion(+) diff --git a/~Documentation/topics/Opgave-2-Kollision.md b/~Documentation/topics/Opgave-2-Kollision.md index eab6c9f..95fbbbc 100644 --- a/~Documentation/topics/Opgave-2-Kollision.md +++ b/~Documentation/topics/Opgave-2-Kollision.md @@ -10,6 +10,7 @@ if (Input.GetKeyDown(KeyCode.Space) && leftoverCooldown <= 0) GameObject bullet = Instantiate(bulletPrefab,transform.position,quaternion.identity); Rigidbody bulletRb = bullet.GetComponent(); bulletRb.velocity = transform.forward * bulletSpeed; + leftoverCooldown = cooldownTime; } ```