示例#1
0
    private IEnumerator DoubleAttack(BattleFieldFigure figure)
    {
        while (_controller != null && _controller.IsAnimationPlaying)
        {
            yield return(new WaitForSeconds(BattleController.animationDelay));
        }
        _controller.IsAnimationPlaying = true;
        figure.LaunchAnAttack();
        yield return(new WaitForSeconds(0.5f));

        figure.LaunchAnAttack();
        _controller.IsAnimationPlaying = false;
        _controller.SwitchTurn();
        _attack = null;
    }
示例#2
0
    private IEnumerator FigureTurn(BattleFieldFigure figure, CellBase cell)
    {
        yield return(figure.MoveToAnotherCellWithAnimation(cell));

        figure.LaunchAnAttack();
        _controller.ActivateAllCells(figure.GetRelevantMoves());
        if (_currentFreezeTime >= _freezeTime)
        {
            _delay             = _maxDelay;
            _currentFreezeTime = 0;
            _freezing          = false;
            IsActive           = false;
            Destroy(_iceImageInstance);
            _controller.SwitchTurn();
        }
    }