Esempio n. 1
0
    public void UpdateStep(TurnManager turnManager)
    {
        Curtain.Off();
        inputs.RightClick();

        CheckTime(turnManager);

        game          = turnManager.GetGame();
        board         = game.GetBoard();
        currentPlayer = game.GetCurrentPlayer();


        nextMovement = LookForMovements.Look(board, currentPlayer);

        if (PlayerInputs.action != null &&
            PlayerInputs.action.manaCost > Player.mana)
        {
            inputs.CleanInputs();
        }
        else if (nextMovement != null)
        {
            GameObject.Find("PlayerInterfaceTools").transform.FindChild("PieceMarked").gameObject.SetActive(false);
            turnManager.FindOneStepLike <UpdateScene> ().nextMovement = nextMovement;
            turnManager.NextStep <UpdateScene>();
            nextMovement = null;
        }
    }
Esempio n. 2
0
    static public Action Look(Board board, Player currentPlayer)
    {
        if (PlayerInputs.actor_where != null && PlayerInputs.action != null)
        {
            Cell cell = PlayerInputs.action.FindCellInDestiny(Tools_PlayerPlay.TakeActorAsCell(PlayerInputs.actor_where, board));


            if (cell != null)
            {
                PlayerInputs.action.destinyCells = new List <Cell>();
                PlayerInputs.action.destinyCells.Add(cell);

                newMovement = PlayerInputs.action;
                inputs.CleanInputs();

                return(newMovement);
            }
            else
            {
                PlayerInputs.actor_where = null;
                return(null);
            }
        }
        else if (PlayerInputs.action != null)
        {
            PlayerInputs.action.LookForMovements(currentPlayer, board);

            if (PlayerInputs.action.destinyCells.Count == 0)
            {
                inputs.CleanInputs();
                return(null);
            }
            else
            {
                UnMarkCells();
                MarkCells(PlayerInputs.action);
            }

            return(null);
        }

        return(null);
    }
Esempio n. 3
0
    public void UpdateStep(TurnManager turnManager)
    {
        canvasControl.ResetManaText();
        inputs.CleanInputs();

        string msj = turnManager.GetGame().GetCurrentPlayerName();

        Curtain.On(1.5f, msj);

        Player.mana = 10;

        turnManager.NextStep <PlayerPlay> ();
    }