예제 #1
0
    public void InitializeSequencer(HangboardProgram hangboardProgram)
    {
        programName      = hangboardProgram.programName;
        hangTime         = hangboardProgram.hangTime;
        restBetweenHangs = hangboardProgram.restBetweenHangs;
        numberOfHangs    = hangboardProgram.numberOfHangs;
        restBetweenSets  = hangboardProgram.restBetweenSets;
        numberOfSets     = hangboardProgram.numberOfSets;
        hangsName        = hangboardProgram.hangsName;

        programNameText.text   = programName;
        numberOfHangsText.text = "1/" + numberOfHangs;
        numberOfSetsText.text  = "1/" + numberOfSets;
        hangNameText.text      = hangsName[0];
    }
예제 #2
0
    public void SaveHangboardProgram(HangboardProgram newHangboardProgram)
    {
        List <HangboardProgram> tempList = new List <HangboardProgram>();

        if (dataModel.hangboardPrograms != null)
        {
            foreach (HangboardProgram o in dataModel.hangboardPrograms)
            {
                tempList.Add(o);
            }
        }

        tempList.Add(newHangboardProgram);

        dataModel.hangboardPrograms = tempList.ToArray();
        SaveDataModel(dataModel);
    }
예제 #3
0
    public void OnSubmitHangboardProgram()
    {
        string programName      = hangboardForm[0].text;
        int    restBetweenHangs = int.Parse(hangboardForm[1].text);
        int    hangTime         = int.Parse(hangboardForm[2].text);
        int    restBetweenSets  = int.Parse(hangboardForm[3].text);
        int    numberOfHangs    = int.Parse(hangboardForm[4].text);
        int    numberOfSets     = int.Parse(hangboardForm[5].text);

        string[] hangsName = hangboardExercicesList.ToArray();

        HangboardProgram hangboardProgram = new HangboardProgram(programName, restBetweenHangs, hangTime, restBetweenSets, numberOfHangs, numberOfSets, hangsName);

        saveSystem.SaveHangboardProgram(hangboardProgram);

        addHangboardCanvas.SetActive(false);
        programListCanvas.SetActive(true);

        LoadPrograms();
    }