Ejemplo n.º 1
0
    public void add(string message, Vector3 pos, eLevel level)
    {
        GameObject newCombatText;

        pool.TryGetNextObject(pos, Quaternion.identity, out newCombatText);

        float angle = Mathf.Clamp(ejectionAngle + UnityEngine.Random.Range(-spreadAngle * 0.5f, spreadAngle * 0.5f), -180, 180);

        CombatText pooledCombatText = newCombatText.GetComponent <CombatText>();

        pooledCombatText.Init(message, duration, speed, angle);
    }