private void HandleAttacks()
    {
        if (attack1 && !this.myAnimator.GetCurrentAnimatorStateInfo(0).IsTag("attack1"))
        {
            myAnimator.SetTrigger("attack1");
            myRigidbody.velocity = Vector2.zero;

            if (ctrBox != null)
            {
                if (ctrBox.GolpePlayer())
                {
                    energy += PremioBox;
                    if (energy > 100)
                    {
                        energy = 100;
                    }
                }
                else
                {
                    energy -= GolpeBox;
                    ctrBox  = null;
                }
            }
            else
            {
                energy -= GolpeAire;
            }
        }
    }
 public void SetControlBox(controlBox ctr)
 {
     ctrBox = ctr;
 }