Ejemplo n.º 1
0
    private void click(GameObject gameObject)
    {
        InputElement input = gameObject.GetComponent <InputElement> ();

        if (input != null && gameBoard.getGameBoardData().canInsert(input.getPosition()))
        {
            gameBoard.cancelPreview();

            gameManager.click(input.getPosition());
        }
    }
Ejemplo n.º 2
0
    private void hover(GameObject gameObject)
    {
        InputElement input = gameObject.GetComponent <InputElement> ();

        if (input != null && gameBoard.getGameBoardData().canInsert(input.getPosition()))
        {
            gameBoard.showPreview(input.getPosition(), GameManager.getActualPlayer());
            input.onHover();

            hoverBefore = true;
        }
    }
Ejemplo n.º 3
0
 public void setInputElementClicked(int position)
 {
     foreach (GameObject inputObject in input)
     {
         InputElement inputElement = inputObject.GetComponent <InputElement> ();
         if (inputElement.getPosition() == position)
         {
             inputElement.inserted();
         }
         else
         {
             inputElement.resetColor();
         }
     }
 }