// Use this for initialization
    void Start()
    {
        // Se inicializan las variables
        fTimeLive = 0.0f;
        fTimeExplosion = 0.0f;
        statusBomb = StatusBomb.alive;

        // Se obtienen el componente Attack del objeto usuario que lanzó esta bomba
        attack = objUser.GetComponent<Attack>();

        listObjsShockwave = new List<Collider>();

        thisSphereCollider = (SphereCollider)collider;
        thisRigidbody = rigidbody;
        thisGameObject = gameObject;
    }
    // Update is called once per frame
    void Update()
    {
        switch (statusBomb)
        {
        case StatusBomb.alive:
            // Pasado el tiempo máximo de vida, explota la bomba.
            fTimeLive += Time.deltaTime;
            if (fTimeLive > fMaxTimeLive)
            {
                statusBomb = StatusBomb.explosion;
                fTimeExplosion = 0.0f;

                // SE CREA LA ANIMACION DE LA EXPLOSION Y SE REPRODUCE EL SONIDO

                // Se activa el trigger y se desactiva el motor de físicas.
                thisSphereCollider.isTrigger = true;
                thisSphereCollider.radius *= fRateShockwave;

                // Se desactivan las físicas porque al activar el trigger, no funcionan las colisiones.
                // De esta manera se evitan problemas al no estar afectado por las físicas.
                thisRigidbody.isKinematic = true;
            }
            break;

        case StatusBomb.explosion:
            // Pasado el tiempo máximo de explosión, se destruye el objeto bomba.
            fTimeExplosion += Time.deltaTime;
            if (fTimeExplosion > fMaxTimeExplosion)
            {
                statusBomb = StatusBomb.death;
                attack.RemoveBomb( thisRigidbody);   // Se elimina la bomba de la lista
                Destroy( thisGameObject);            // Se destruye el objeto bomba

            }
            break;

        default:
            break;
        }
    }