Esempio n. 1
0
    private void FloatingText(Color color, string message, int font = 10, float speed = 1f)
    {
        FloatingText text = Instantiate(floatingTextPrefab);

        text.SetPosition(transform.position);

        text.SetColor(color);
        text.SetText(message);
        text.SetFont(font);
        text.SetLifeTime(1f);
        text.SetVelocity(new Vector2(0, speed));
    }