示例#1
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);
        }
示例#2
0
        public void Spawn(float damage)
        {
            DamageText instance = Instantiate(damageTextPrefab, transform.position, Quaternion.identity);

            instance.SetValue(damage);
        }
示例#3
0
        public void Spawn(float damageAmount)
        {
            DamageText instance = Instantiate <DamageText>(damageTextPrefab, transform);

            instance.SetValue(damageAmount);
        }