Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        // gets the checklist if it hasn't been set.
        if (tutorialList == null)
        {
            tutorialList = GetComponent <Checklist>();
        }

        // goes through the steps list and adds them to the Checklist
        for (int i = 0; i < stepList.Count; i++)
        {
            tutorialList.AddStep(stepList[i]);
        }

        // active tutorial checklist
        tutorialList.SetActiveList(true);

        // if the tutorial list is active, show the text
        // if(tutorialList != null && tutorialList.activeList)
        // {
        //     if (!tutorialList.IsCompleteList())
        //         stepText.text = "Step " + tutorialList.GetCurrentStepNumber() + " - " +
        //             tutorialList.GetCurrentStep().name + ": " + tutorialList.GetCurrentStep().description;
        //     else
        //         stepText.text = "Tutorial is Complete!";
        //
        //     currStep++;
        // }


        // steps.Add(new Step());
    }