public void Bump() { if (fLifetime > 0.5f) { transform.position += new Vector3(Random.Range(-0.1f, 0.1f), 0.25f, 0.1f); if (nextNumbers != null) { nextNumbers.Bump(); } } }
public void MakeDamageNumbers(int iDamage, DamageNumbers prefab) { DamageNumbers dn = Instantiate <DamageNumbers>(prefab); dn.transform.position = transform.position + new Vector3(0.0f, minion.template.fHeight, 0.0f); dn.Init(iDamage); if (baseNumbers != null) { baseNumbers.Bump(); dn.nextNumbers = baseNumbers; } baseNumbers = dn; }