Added camera shake anytime a bullet is instantiated

This commit is contained in:
Gregory Campbell
2020-07-11 20:46:20 -04:00
parent a1904de31e
commit f08dc0fee4
15 changed files with 1672 additions and 0 deletions
+3
View File
@@ -7,11 +7,14 @@ public class BulletScript : MonoBehaviour
private float speed;
private Rigidbody2D rb;
private ShakeScript shake;
void Start()
{
rb = GetComponent<Rigidbody2D>();
speed = Random.Range(3.0f, 8.0f);
shake = GameObject.Find("Shake Manager").GetComponent<ShakeScript>();
shake.CamShake();
}
void FixedUpdate()