Ejemplo 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;
        }
    }
Ejemplo n.º 2
0
 public void RightClick()
 {
     if (Input.GetMouseButtonDown(1))
     {
         CleanInputs();
         GameObject.Find("Canvas").GetComponent <go_Canvas> ().SkillsMenuOff();
         LookForMovements.UnMarkCells();
         GameObject.Find("PlayerInterfaceTools").transform.FindChild("PieceMarked").gameObject.SetActive(false);
     }
 }
Ejemplo n.º 3
0
    public void UpdateStep(TurnManager turnManager)
    {
        canvas.SkillsMenuOff();

        if (nextMovement != null)
        {
            AnimationFactory.ExecuteAnimation(nextMovement);
            turnManager.FindOneStepLike <UpdateGame> ().nextMovement = nextMovement;
            canvas.SetManaText(Player.mana - nextMovement.manaCost);
            nextMovement = null;
            turnManager.NextStep <UpdateGame> ();
            LookForMovements.UnMarkCells();
        }

        if (deadPieces.Count != 0)
        {
            DeadAnmiations();
            deadPieces = new List <Cell> ();
            turnManager.NextStep <UpdateGame> ();
        }
    }