private SmartCarouselItem CreateCarouselItem(ExerciseData exercise) { SmartCarouselItem newCarouselItem = Instantiate(_carouselItemPrefab); FitBoyAnimator fitBoyAnimator = newCarouselItem.GetComponent <FitBoyAnimator> (); fitBoyAnimator.Init(exercise.exerciseType); newCarouselItem.Init(_horizontalLayoutGroup.transform); return(newCarouselItem); }
public void Init(ExerciseData exercise, int currentExerciseIndex, int totalExercises) { Show(); UpdateExerciseView(exercise.name, currentExerciseIndex, totalExercises); fitBoyAnimator.Init(exercise.exerciseType); _weightLabel.text = PlayerPrefs.GetString("weightType") + "s"; _previousFitBoy.color = ColorManager.Instance.ActiveColorDark; _nextFitBoy.color = ColorManager.Instance.ActiveColorDark; }
public void PeakAtExercise(ExerciseData exerciseToPeakAt) { _peakIndex = PlayModeManager.Instance.ActiveWorkout.exerciseData.IndexOf(exerciseToPeakAt); _container.SetActive(true); _lineSegmenter.Init(exerciseToPeakAt.totalInitialSets); _fitBoy.Init(exerciseToPeakAt.exerciseType); _exerciseName.text = exerciseToPeakAt.name.ToString(); _setAmount.text = exerciseToPeakAt.totalInitialSets.ToString(); _repAmount.text = "x " + exerciseToPeakAt.repsPerSet.ToString(); _weightAmount.text = exerciseToPeakAt.weight.ToString() + " lb"; _secondsAmount.text = exerciseToPeakAt.secondsToCompleteSet.ToString() + "s"; }
public void Init(ExerciseData exerciseToEdit, bool isCreatingNewExercise, bool shouldAutoSelectInputField) { currentExerciseMenuItem = null; currentExerciseData = exerciseToEdit; _exerciseNameInputField.text = exerciseToEdit.name; _setsRow.Init(this); _repsRow.Init(this); _weightRow.Init(this); _secondsRow.Init(this); Show(); if (fitBoyAnimator != null) { fitBoyAnimator.Init(exerciseToEdit.exerciseType); } this.isCreatingNewExercise = isCreatingNewExercise; if (shouldAutoSelectInputField) { _exerciseNameInputField.Select(); } }
public void Init(ExerciseData exerciseData) { this.exerciseData = exerciseData; exerciseName.text = exerciseData.name; UpdateStatsText(exerciseData.totalInitialSets, exerciseData.repsPerSet, exerciseData.weight, exerciseData.secondsToCompleteSet); fitBoyAnimator.Init(exerciseData.exerciseType); UpdateColor(); UpdateSetsCompleteDisplay(exerciseData.totalSets, exerciseData.totalInitialSets); if (exerciseData.isInProgress) { _activeIndicator.SetActive(true); } }
public void Init() { transform.SetParent(WorkoutHUD.Instance.transform); transform.localScale = Vector3.one; transform.localPosition = Vector3.one; _fitBoy.Init(ExerciseType._custom); _title.text = GetRandomTitle(); foreach (Image colorImage in _images) { colorImage.color = ColorManager.Instance.ActiveColorLight; } _body.color = ColorManager.Instance.ActiveColorLight; StartCoroutine(playAirhornDelayed()); }