private void Replace(ChoiceItem choiceItem, GameObject playlistItemPrefab) { var childIndex = choiceItem.transform.GetSiblingIndex(); var rightChoiceItem = InstantiateChoice(choiceItem.Choice, playlistItemPrefab, _content); Destroy(choiceItem.gameObject); rightChoiceItem.transform.SetSiblingIndex(childIndex); }
public void ReplaceByWrongChoiceItem(ChoiceItem choiceItem) { var childIndex = choiceItem.transform.GetSiblingIndex(); var rightChoiceItem = InstantiateChoice(choiceItem.Choice, _wrongChoiceItem, _content); Destroy(choiceItem.gameObject); rightChoiceItem.transform.SetSiblingIndex(childIndex); }
private void PlaylistItemOnClicked(ChoiceItem choiceItem) { Selected(choiceItem.Choice); }