示例#1
0
    public void Sayit(string text, Color color, Vector3 position)
    {
        Hit txt = damageText.Create();

        damageText.prefab.transform.position = new Vector3(Random.Range(-150, 150), Random.Range(0, 300));
        txt.GetComponent <Animation>().Play("RisingText");
        txt.animationLenght = 1.0f;
        txt.Adjust(text);

        //txt.GetComponent<RectTransform>().anchoredPosition3D = new Vector3(0.0f, 0.0f, 0.0f);
        txt.textView.GetComponent <RectTransform>().localScale = new Vector3(0.8f, 0.8f, 1.0f);
        txt.textView.color = color;
    }