Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Start()
- {
- //calculate how many seconds is one beat
- //we will see the declaration of bpm later
- secPerBeat = 60f / bpm;
- //record the time when the song starts
- dsptimesong = (float) AudioSettings.dspTime;
- //start the song
- GetComponent<AudioSource>().Play();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement