/// <summary> /// Requests the placement in node grid. /// </summary> public void RequestPlacementInNodeGrid(XyloKey key) { RectTransform rect = GetComponent <RectTransform>(); rect.SetParent(m_NoteManager.m_NoteGrid.GetComponent <RectTransform>(), false); rect.anchoredPosition = m_NoteManager.m_Bar.anchoredPosition; m_NoteManager.RequestHeightInGrid(key, this); }
/// <summary> /// This places the note on the note grid /// </summary> /// <param name="key">This is the xylophone key that spawned the note.</param> /// <param name="note">This is a reference to the spawned note.</param> public void RequestHeightInGrid(XyloKey key, Note note) { RectTransform rect = note.GetComponent <RectTransform>(); rect.anchoredPosition = new Vector2(rect.anchoredPosition.x, rect.anchoredPosition.y + (key.m_Identifier * 50)); }