Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OnCollisionEnter2D(Collision2D collision)
- {
- Vector3 tweak = new Vector3(Random.Range(0f, 0.2f), Random.Range(0f, 0.2f), 0f);
- if (hasStarted)
- {
- GetComponent<AudioSource>().Play();
- rigidbody.velocity += tweak;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement