void OnItemClick(GameObject go) { int ind = -1; for (int i = 0; i < items.Length; i++) { if (items[i].l.gameObject == go) { if (!items[i].locked) { ind = i; } break; } } if (ind != -1) { SlotInfo.LoadTimeTrialData(); SceneState.instance.SetGlobalValue(LevelController.timeTrialKey, 1, false); Main.instance.sceneManager.LoadScene(TimeTrial.instance.data[ind].level); } }