Exemple #1
0
    private IEnumerator MoveAndUpdateTurns(BattleFieldFigure figure, BattleFieldCell cell)
    {
        figure.BattleField.BattleController.DeactivateAllCells();
        yield return(figure.MoveToAnotherCellWithAnimation(cell));

        if (figure.GetRelevantMoves().Length > 0)
        {
            figure.BattleField.BattleController.ActivateAllCells(figure.GetRelevantMoves());
        }
        else
        {
            figure.BattleField.BattleController.SwitchTurn();
        }
    }
Exemple #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();
        }
    }
Exemple #3
0
 protected override void SkillAction(BattleFieldFigure figure, BattleFieldCell cell)
 {
     StartCoroutine(figure.MoveToAnotherCellWithAnimation(cell));
     _controller.ActivateAllCells(figure.GetRelevantMoves());
 }