public (bool, int) TryPick(IdolData data) { for (int i = 0; i < MaxPick; i++) { if (!isSlotFilled[i]) { var res = PickGroup.SetIdol(i, data, IsWorkLessonPick, out string reason); if (res == true) { isSlotFilled[i] = true; return(true, i); } else { RejectObject.text.text = reason; Motion.StopPlayback(); Motion.Play("PickerRejectNotiAnim", -1, 0); return(false, -1); } } } RejectObject.text.text = "슬롯이 다 찼습니다."; Motion.StopPlayback(); Motion.Play("PickerRejectNotiAnim", -1, 0); return(false, -1); }
public (bool, int) TryPick(IdolData data) { for (int i = 0; i < MaxPick; i++) { if (!isSlotFilled[i]) { PickGroup.SetIdol(i, data); isSlotFilled[i] = true; return(true, i); } } return(false, -1); }