Пример #1
0
 public void DisplayIndicatorIfNotDisplayedYet(IndicatorID id)
 {
     if (!hasIndicatorBeenDisplayed(id))
     {
         DisplayIndicator(id, true);
     }
 }
Пример #2
0
    public bool hasIndicatorBeenDisplayed(IndicatorID id)
    {
        TutorialIndicator t   = GetTutorialIndicatorById(id);
        bool hasBeenDisplayed = false;

        if (t != null)
        {
            hasBeenDisplayed = t.passed;
        }
        return(hasBeenDisplayed);
    }
Пример #3
0
        public TutorialIndicator(IndicatorID id, string name, string text, GameObject panel, bool atStart, IndicatorID indicatorToDisplayOnTouch)
        {
            this.id   = id;
            this.name = name;
            //this.text = text;
            this.panel   = panel;
            this.atStart = atStart;
            this.passed  = false;
            this.indicatorToDisplayOnTouch = indicatorToDisplayOnTouch;

            Initialize();
        }
Пример #4
0
    public void TutorialIndicatorTouched(IndicatorID id)
    {
        //Debug.Log("Tutorial Indicator Touched [" + id + "]");
        DisplayIndicator(id, false);

        IndicatorID nextElementID = GetTutorialIndicatorById(id).indicatorToDisplayOnTouch;

        if (nextElementID != 0)
        {
            DisplayIndicatorIfNotDisplayedYet(nextElementID);
        }
    }
Пример #5
0
    public void DisplayIndicator(IndicatorID id, bool enable)
    {
        TutorialIndicator t = GetTutorialIndicatorById(id);

        if (t != null)
        {
            t.panel.SetActive(enable);
            if (enable)
            {
                t.passed = true;
            }
        }
    }
Пример #6
0
    public TutorialIndicator GetTutorialIndicatorById(IndicatorID id)
    {
        TutorialIndicator t = null;

        foreach (TutorialIndicator tutoIndi in availableTutorialIndicators)
        {
            if (tutoIndi.id == id)
            {
                t = tutoIndi;
                break;
            }
        }
        return(t);
    }