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; } ```