示例#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();
        }
    }
示例#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();
        }
    }
示例#3
0
    protected override void SkillAction(BattleFieldFigure figure, BattleFieldCell cell)
    {
        var turns = figure.GetRelevantMoves();

        foreach (var turn in turns)
        {
            var obj = Instantiate(battleFieldObject, figure.BattleField.transform);
            obj.MoveToAnotherCell(turn);
            obj.Team = figure.Data.Team;
        }

        if (!_continueTurn)
        {
            figure.BattleField.BattleController.SwitchTurn();
        }
    }
示例#4
0
 protected override void SkillAction(BattleFieldFigure figure, BattleFieldCell cell)
 {
     StartCoroutine(figure.MoveToAnotherCellWithAnimation(cell));
     _controller.ActivateAllCells(figure.GetRelevantMoves());
 }