// Use this for initialization void Start () { catcherScript = GameObject.Find ("Catcher").GetComponent<CatcherScript> (); track = startTrack; timePerBeat = 60f / 120f; rotateTime = timePerBeat / 4; rotatePerSec = 20f / rotateTime; rotateLeft = rotateRight = false; rotateDegrees = 0; }
// Use this for initialization void Start() { catcherScript = GameObject.Find("Catcher").GetComponent<CatcherScript>(); trackSource = transform.parent.GetComponent<TrackController>().source; songController = GameObject.Find("Tracks").GetComponent<SongController>(); initPos = transform.position.z; samplesSinceStart = trackSource.timeSamples; tempo = songController.tempo; timePerBeat = 60 / tempo; }