public void ShowCurrentCategory() { if ((Exercise.MuscleGroup)currentCategory.GetIndex() == Exercise.MuscleGroup.All) { for (int i = 0; i < spawnedItems.Count; i++) { spawnedItems[i].gameObject.SetActive(true); } } else { for (int i = 0; i < spawnedItems.Count; i++) { spawnedItems[i].gameObject.SetActive(spawnedItems[i].excercise.muscleGroup == (Exercise.MuscleGroup)currentCategory.GetIndex()); } } }
private Exercise GetMadeExcercise() { Exercise newExcercise = new Exercise(); newExcercise.excerciseName = nameInput.text; if (isTimedToggle.isOn) { newExcercise.repDuration = int.Parse(setDurationInput.text); } else { newExcercise.repDuration = 0; } newExcercise.muscleGroup = (Exercise.MuscleGroup)muscleGroup.GetIndex(); newExcercise.equipmentGroup = (Exercise.EquipmentGroup)equipmentGroup.GetIndex(); newExcercise.setIsTimed = isTimedToggle.isOn; return(newExcercise); }
private void UiEnumSelector_onUpdated() { heatmapState = (HeatmapState)uiEnumSelector.GetIndex(); UpdateHeatmap(); heatmapMuscleList.DisplayItems(); }