コード例 #1
0
    public static void CreateFloatingText(string text, Transform location)
    {
        DamageTextScript instance = Instantiate(popupTextPrefab);

        instance.transform.SetParent(canvas.transform, false);
        instance.SetText(text);
    }
コード例 #2
0
    public static void CreateDamageText(float val, Transform location)
    {
        DamageTextScript instance = Instantiate(popup);

        instance.transform.SetParent(canvas.transform, false);
        instance.transform.position = location.position;
        instance.SetText(val);
    }