Ejemplo n.º 1
0
 void Update()
 {
     if (_fadingTimer != null)
     {
         _fadingTimer.Update();
         if (_fadingTimer.hasEnded)
         {
             _fadingTimer = null;
         }
     }
     UpdateColor();
 }
Ejemplo n.º 2
0
    public void Talk(string text, bool angered = false)
    {
        if (angered)
        {
            mesh.color = angerColors.PickRandom();
        }
        else
        {
            mesh.color = colors.PickRandom();
        }

        mesh.text    = text;
        _fadingTimer = new FadingTimer(0.5f, 4f, 0.5f);
    }