public void Spawn(float damageAmount) { DamageText instance = Instantiate <DamageText>(damageTextPrefab, transform); }
public void Spawn(float damage) { DamageText instance = Instantiate(damageTextPrefab, transform.position, Quaternion.identity); instance.SetValue(damage); }
public void SpawnDamageText(float damage) { DamageText instance = Instantiate <DamageText>(damageText, transform); instance.SetDamageText(damage); }
[SerializeField] DamageText m_DamageTextPrefab = null; //Reference to damage text prefab ///////////////////////////// PUBLIC METHODS //////////////////////////////////////////// //Spawns the prefab with the sent value public void SpawnText(float amount) { DamageText instance = Instantiate <DamageText>(m_DamageTextPrefab, transform); instance.SetValue(amount); }
public void SpawnDamageText(float damageAmount) { DamageText instance = Instantiate(damageTextPrefab, this.transform); instance.SetValue(damageAmount); }