示例#1
0
 public void Show(bool alert)
 {
     if (alert && AlertScript != null)
     {
         AlertScript.Show();
         CorrectScript.Hide();
     }
     else if (CorrectScript != null)
     {
         CorrectScript.Show();
         AlertScript.Hide();
     }
 }
    // Shows notice until function return false
    public void Show(Notice which, bool red, System.Func <bool> until)
    {
        UINoticeScript script = this.GetScript(which, red);

        if (script != null)
        {
            if (which != Notice.Glow)
            {
                this.HideOthers(which, red);
            }

            script.Show();

            if (until != null)
            {
                StartCoroutine(Hide(script, until));
            }
        }
    }
    // Shows notice and hides all other notices
    // If positive howLong is given hides after that many seconds
    public void Show(Notice which, bool red, int howLong = -1)
    {
        UINoticeScript script = this.GetScript(which, red);

        if (script != null)
        {
            if (which != Notice.Glow)
            {
                this.HideOthers(which, red);
            }

            script.Show();

            if (howLong > 0)
            {
                StartCoroutine(Hide(script, howLong));
            }
        }
    }