/// <summary> /// Do both of these lines rhyme? /// </summary> public static bool Rhymes(RhymeLine a, RhymeLine b) { if (a == null || b == null) { return(false); } else { return(a.rhymeIndex == b.rhymeIndex); } }
public void OnEndDrag(PointerEventData eventData) { if (dragging) { dragging = false; EndFlash(); LyricDragCursor.current.Deactivate(); if (mousedOver != null && mousedOver != this) { RhymeLine temp = rhymeLine; rhymeLine = mousedOver.rhymeLine; mousedOver.rhymeLine = temp; } } }
private bool RhymesWithUpperOrLower(int index) { if (index > 0) { if (RhymeLine.Rhymes(lines [index].rhymeLine, lines [index - 1].rhymeLine)) { return(true); } } if (index < lines.Length - 1) { if (RhymeLine.Rhymes(lines [index].rhymeLine, lines [index + 1].rhymeLine)) { return(true); } } return(false); }