示例#1
0
 public void Spawn(float damageAmount)
 {
     DamageText instance = Instantiate <DamageText>(damageTextPrefab, transform);
 }
示例#2
0
        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);
        }
示例#4
0
        [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);
        }