public SR_Note(UnityEngine.Vector3 pos, string idRoot = "", int idCmb = -1, SNoteType t = SNoteType.OneHandSpecial) { if (idRoot != null) { Id = idRoot.ToString(); } ComboId = idCmb; Type = t; Position = new float[3] { pos.x, pos.y, pos.z }; }
private void OnNoteTypeChanged(SNoteType oldType, SNoteType newType) { switch (newType) { case SNoteType.LeftHanded: _meshRenderer.material.color = Color.red; break; case SNoteType.RightHanded: _meshRenderer.material.color = Color.blue; break; case SNoteType.OneHandSpecial: _meshRenderer.material.color = Color.green; break; case SNoteType.BothHandsSpecial: _meshRenderer.material.color = Color.yellow; break; } }
public SNoteData FindNoteData(float beatTime, SNoteType noteType) { int idx = BinarySearchOrderedNotes(beatTime); if (idx == -1) { Debug.LogWarning("Couldn't find note with time " + beatTime); return(null); } for (int i = idx; i < orderedNotes.Count; ++i) { SNote t = orderedNotes[i]; if (FastApproximately(t.data.beatTime, beatTime) && t.data.noteType == noteType) { return(t.data); } } Debug.LogWarning("Couldn't find note with time " + beatTime + " and index " + idx); return(null); }