示例#1
0
    public override void HideAttackEffect(UnitBase _unitToAttack)
    {
        //No usa la base porque es el propio monje

        if (rotatorTime)
        {
            if (rotatorTime2)
            {
                if (_unitToAttack.isMarked)
                {
                    PutQuitMark(_unitToAttack, this, false, false);

                    //COMPROBAR QUE NO DE ERROR EN OTRAS COSAS
                    TM.surroundingTiles.Clear();

                    TM.GetSurroundingTiles(_unitToAttack.myCurrentTile, 1, true, false);

                    //Marco a las unidades adyacentes si no están marcadas
                    for (int i = 0; i < TM.surroundingTiles.Count; ++i)
                    {
                        if (TM.surroundingTiles[i].unitOnTile != null)
                        {
                            if (TM.surroundingTiles[i].unitOnTile.GetComponent <EnemyUnit>() &&
                                !TM.surroundingTiles[i].unitOnTile.GetComponent <EnemyUnit>().isMarked)
                            {
                                if (!hasAttacked)
                                {
                                    PutQuitMark(TM.surroundingTiles[i].unitOnTile, this, false, false);
                                }
                            }
                        }
                    }
                }

                _unitToAttack.hoverRotateIcon.SetActive(false);
            }

            else
            {
                if (!hasAttacked)
                {
                    PutQuitMark(_unitToAttack, this, false, false);
                }

                _unitToAttack.hoverRotateIcon.SetActive(false);
            }
        }

        //Monje
        DisableCanvasHover();
        ResetColor();
        myCurrentTile.ColorDeselect();

        //Enemigo
        PutQuitMark(_unitToAttack, this, false, false);
        _unitToAttack.ResetColor();
        _unitToAttack.DisableCanvasHover();
    }
示例#2
0
    public override void HideAttackEffect(UnitBase _unitToAttack)
    {
        base.HideAttackEffect(_unitToAttack);

        if (smokeBomb)
        {
            for (int i = 0; i < bombsShadowSpawned.Count; i++)
            {
                Destroy(bombsShadowSpawned[i].gameObject);
            }

            bombsShadowSpawned.Clear();
        }

        _unitToAttack.DisableCanvasHover();

        sombraHoverUnit.SetActive(false);
    }