//Transplanter ce script dans Hacked pour éciter le bug de perte de hack quand tué au cac alors que hacked

    /*public void Kill()
     * {
     *  gameObject.SetActive(false);
     *  PS.score+=1;
     * }*///Plus Utile car relatif au PlayerInteract *OBSOLETE*

    public void FixedUpdate()
    {
        if (PA != null && Ha != null && BE != null) // && ParticuleSystem != null)
        {
            if (nearPlayer && PA.isAttacking && Ha.boom == false)
            {
                HE.hacked = false;
                PS.score += 1;
                dead      = true;
                //gameObject.SetActive(false);
                Ha.boom = true;
                BE.RedEffect();
                startParticuleEffect = true;
                FindObjectOfType <AudioManager>().Play("TêteExplosée");
                CS.StartShake();
            }
            ParticuleEffectTimer();
        }
    }
 public void Boom()
 {
     Debug.Log("Boom");
     if (hacked && !boom)
     {
         hacked    = false;
         HE.hacked = false;
         BE.RedEffect();
         startParticuleEffect = true;
         FindObjectOfType <AudioManager>().Play("HackBoom");
         FindObjectOfType <AudioManager>().Play("TêteExplosée");
         CS.StartShake();
         boom             = true;
         PH.amountOfHack += 1;
         PS.score        += 1;
         ownIA.dead       = true; //Repérage par les autres si disparu
         //gameObject.SetActive(false);
     }
 }