public void SetDiceValue(int val) { diceValue = dice.DiceResult(val); rollDiceButton.SetActive(false); Debug.Log(diceValue); dvText.text = "" + diceValue; if (diceValue == 0) { EnemyTurn(); } if (diceValue == 4 && !CanPlayerMove(diceValue)) { EnemyTurn(); } if (countersOnBoard > 0) { selectingObject = true; } else { if (diceValue == 1 && countersOffBoard > 0 && countersOnBoard == 0) { counters[countersOffBoard - 1].PlaceOnBoard(boardPositions[0], false, false, false); countersOffBoard--; countersOnBoard++; aiAnim.SetTrigger("Angry"); //EnemyTurn(); } else if (diceValue == 5 && countersOffBoard > 0 && countersOnBoard == 0) { counters[countersOffBoard - 1].PlaceOnBoard(boardPositions[4], false, false, false); countersOffBoard--; countersOnBoard++; aiAnim.SetTrigger("Angry"); //EnemyTurn(); } else { EnemyTurn(); } } }