// Use this for initialization void Start() { try { xmlReader = this.GetComponent <XMLReaderMusic>(); if (FileName != null) { xmlReader.ReadLocalFile(FileName); musicSheet = xmlReader.musicSheet; } } catch { } initPositionNotes = musicSheet.InitPositionNotes; Tempo = musicSheet.Tempo; TotalMeasures = musicSheet.TotalMeasures; BeatsPerMeasure = musicSheet.BeatsPerMeasure; actualBeat = 1; actualMeasure = 1; tempoSong = 60f / Tempo; sw = new Stopwatch(); this.speed = -0.0945f * (Tempo / 60f); actualScore = 0; partBeat = 1; sw.Start(); UpdateTimmer(); }
// Use this for initialization void Start() { xmlReader = this.GetComponent <XMLReaderMusic>(); #if !UNITY_EDITOR LvlState = State.ScanQR; #endif #if UNITY_EDITOR LvlState = State.LoadXML; #endif }