Exemple #1
0
    public Tip GenerateTip(TipScript tipScript)
    {
        Tip tip = Tip.CreateInstance <Tip>();

        tip.DisplayText = tipScript.TipText;
        tip.ID          = tipScript.GetInstanceID();//TipID;
        //If tips are enabled display
        if (TipsEnabled)
        {
            if (nothingDisplayed)
            {
                DisplayTip(tip);
            }
            else
            {
                listQueue.Add(tip);
            }
        }//Otherwise mark as seen (bypass and not be shown later)
        else
        {
            if (!nothingDisplayed)
            {
                //Get tip being displayed and disable
                //then mark as displayed
                tipHolder.gameObject.SetActive(false);
            }
            tip.WasDisplayed = true;
        }

        //Can be removed, does nothing so far
        return(tip);
    }