private BeatText readText() { var text = new BeatText(); text.value = GPBase.readIntByteSizeString(); return(text); }
private BeatText ReadText() { var text = new BeatText(); text.Value = GpBase.ReadIntByteSizeString(); return(text); }
private void AdvanceBeatIndex() { lastInstantiatedBeat++; if (lastInstantiatedBeat < toPlay.Count) { var currentBeat = toPlay[lastInstantiatedBeat]; var lastBeat = (lastInstantiatedBeat > 0) ? toPlay[lastInstantiatedBeat - 1] : BeatBit.None; if (currentBeat != BeatBit.None) { if (lastBeat == BeatBit.Long) { // make the last block longer lastInstantiatedBlock.SetBeatLength(lastInstantiatedBlock.BeatLength + 1); } else { // make a new block lastInstantiatedBlock = Instantiate(beatBlockPrefab, beatTrack).GetComponent <BeatBlock>(); lastInstantiatedBlock.StartOnBeat = lastInstantiatedBeat; lastInstantiatedBlock.UpdatePosition(); lastInstantiatedBlock.transform.SetSiblingIndex(1); // draw order instantiatedBlocks.Add(lastInstantiatedBlock); } } else { lastInstantiatedBlock = null; } } else { lastInstantiatedBeat = toPlay.Count; // the end } if ((lastInstantiatedBeat % 8) == 0) { int wordIndex = lastInstantiatedBeat / 8; BeatText beatText = Instantiate(beatTextPrefab, beatTrack).GetComponent <BeatText>(); beatText.StartOnBeat = lastInstantiatedBeat; beatText.UpdatePosition(); beatText.transform.SetSiblingIndex(1); beatText.SetText(poem[wordIndex]); instantiatedBeatTexts.Add(beatText); } }