public void GenerateRandomChallenge()
 {
     exerciseList.Clear();
     startMyWorkoutButton.gameObject.SetActive(false);
     exerciseList.ShowLoadingPanel();
     RestClient.Get <ServerResponse <Workout> > (App.instance.config.host + "/workout/random/" + minuteInput.text).Then((serverResponse) => {
         myWorkout = serverResponse.data;
         exerciseList.SetData(myWorkout.exercises);
         myWorkoutNameText.text = myWorkout.name;
         startMyWorkoutButton.gameObject.SetActive(true);
     }).Catch((error) => {
         exerciseList.ShowErrorPanel();
     });
 }
Example #2
0
 void RenderExerciseList()
 {
     workoutName.text = date.workout.name;
     exerciseList.SetData(date.workout.exercises);
 }