Example #1
0
    public void PresentationMode(GameObject lesson)
    {
        if (SliceButtVisible)
        {
            ShowSliceButt();
        }
        if (WayVisible)
        {
            Ways(currentWay);
        }
        PresentationMode present = lesson.GetComponent <PresentationMode>();

        present.slide = slideTimer;
        present.WindOfChange();
        sceneCube.SetActive(PresentationVisible);
        presentation.SetActive(!PresentationVisible);
        lesson.SetActive(!PresentationVisible);
        if (MenuVisible)
        {
            Clicked();
        }
        sliceButt.SetActive(PresentationVisible);
        PresentationVisible = !PresentationVisible;
        _currentLesson      = lesson;
        if (captionsVisible)
        {
            ShowCaption();
        }
        if (lesson == present.rc)
        {
            present.TurnModel();
        }
    }
Example #2
0
    public void AnotherSlideLink(int link)
    {
        int link2 = link;
        int first = link2;

        while (link2 > 10)
        {
            first = (link2 /= 10) % 10;
        }

        switch (first)
        {
        case 1:
            AnotherSlideHelper(nr);
            break;

        case 2:
            AnotherSlideHelper(rp);
            break;

        case 3:
            AnotherSlideHelper(ap);
            break;

        case 4:
            AnotherSlideHelper(sn);
            break;

        case 5:
            AnotherSlideHelper(ms);
            break;

        case 6:
            AnotherSlideHelper(rc);
            break;

        case 7:
            AnotherSlideHelper(hm);
            break;
        }

        void AnotherSlideHelper(GameObject category)
        {
            category.SetActive(true);
            PresentationMode pm = category.GetComponent <PresentationMode>();

            pm.slide = link - first * 100;
            pm.ShowButt();
            pm.WindOfChange();
            if (category != this1)
            {
                this1.SetActive(false);
            }
            pm.TurnModel();
        }
    }