예제 #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);
        }