示例#1
0
 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());
         }
     }
 }
示例#2
0
    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);
    }
示例#3
0
 private void UiEnumSelector_onUpdated()
 {
     heatmapState = (HeatmapState)uiEnumSelector.GetIndex();
     UpdateHeatmap();
     heatmapMuscleList.DisplayItems();
 }