private void Die()
    {
        gameObject.tag = "DeadHero";
        BSM.DestroyButtons();
        BSM.heroesInBattle.Remove(gameObject);
        BSM.heroesToManage.Remove(gameObject);
        selector.SetActive(false);
        BSM.actionsPanel.SetActive(false);
        BSM.enemySelectPanel.SetActive(false);

        if (BSM.heroesInBattle.Count > 0)
        {
            for (int i = 0; i < BSM.actionsInTurn.Count; i++)
            {
                if (BSM.actionsInTurn[i].attackerGameObject == this)
                {
                    BSM.actionsInTurn.Remove(BSM.actionsInTurn[i]);
                }

                foreach (GameObject target in BSM.actionsInTurn[i].targets)
                {
                    if (target == gameObject)
                    {
                        BSM.actionsInTurn[i].targets.Remove(gameObject);
                        if (BSM.actionsInTurn[i].targets.Count <= 0)
                        {
                            BSM.actionsInTurn[i].targets = new List <GameObject>
                            {
                                BSM.heroesInBattle[Random.Range(0, BSM.heroesInBattle.Count)]
                            };
                        }
                    }
                }
            }
        }
        gameObject.GetComponent <MeshRenderer>().material.color = Color.black;
        isAlive         = false;
        BSM.battleState = BattleStateMachine.PerformAction.CHECK_ALIVE;
    }