public static void CreateFloatingText(string text, Transform location) { DamageTextScript instance = Instantiate(popupTextPrefab); instance.transform.SetParent(canvas.transform, false); instance.SetText(text); }
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); }