Created
June 8, 2019 12:50
-
-
Save identity2/17ee12433cf4362cd476cb601ef65280 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment