示例#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());
        }
    }
示例#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;
        }
    }
 public void setInputElementClicked(int position)
 {
     foreach (GameObject inputObject in input)
     {
         InputElement inputElement = inputObject.GetComponent <InputElement> ();
         if (inputElement.getPosition() == position)
         {
             inputElement.inserted();
         }
         else
         {
             inputElement.resetColor();
         }
     }
 }