Exemplo n.º 1
0
    void FillTipList()
    {
        foreach (var tip in UserDataObject.GetCurrentTipsArray())
        {
            GameObject gameObjectTipPanel = Instantiate(exerciseTipPanel) as GameObject;
            TipPanel   tipPanel           = gameObjectTipPanel.GetComponent <TipPanel>();

            tipPanel.tipDescription.text = tip.description;
            tipPanel.tipNumber.text      = (Array.IndexOf(UserDataObject.GetCurrentTipsArray(), tip) + 1).ToString();

            gameObjectTipPanel.transform.SetParent(spacer, false);
        }

        exerciseRepetitions.text = UserDataObject.GetCurrentRepetitionsArrayLength().ToString();
        exerciseMinTime.text     = UserDataObject.GetCurrentRepetitionMinTime() + " sec";
    }