Exemple #1
0
 public void DisplayInstant(string s)
 {
     now.color = Color.white;
     now.text  = s;
     mode      = PlayerNowMessageDisplayMode.Instant;
     t         = 5;
 }
Exemple #2
0
    public void Display(string s, Color col, Vector3 p, Sprite img = null)
    {
        if (mode == PlayerNowMessageDisplayMode.Showing && s == lastThingSaid)
        {
            return;
        }


        icon.sprite = img;
        if (img != null)
        {
            usingIcon  = true;
            icon.color = Color.white;
        }
        else
        {
            usingIcon = false;
        }
        lastThingSaid     = s;
        lastPlaceSpokenTo = p;


        now.color  = col;
        textIndex  = 0;
        targetText = s;
        targetText = Utils.UsePlayerNameInText(targetText);
        mode       = PlayerNowMessageDisplayMode.Showing;
        now.color  = Color.white;
        now.text   = "";
        t          = targetText.Length / 4f;
        typeTimer  = 0;
        if (PlayerTextToSpeech.speechEnabled)
        {
            PlayerTextToSpeech.inst.Speak(s);
        }
    }
Exemple #3
0
 public void Hide()
 {
     t         = 0;
     now.color = new Color(1, 1, 1, 0);
     mode      = PlayerNowMessageDisplayMode.Hidden;
 }