public void Click(InputAction.CallbackContext context) { if (context.performed) { if (_isMyTurn) { dices[_diceIndex] = Randomizer.UsingDice(); _diceIndex += 1; OnDiceRoled?.Invoke(this); if (_diceIndex == dices.Length) { _isMyTurn = false; OnPlayerFinished?.Invoke(this); } } } }
private void PlayerFinished() { PlayerAnimator.SetBool("Run", false); HasFinished = true; OnPlayerFinished?.Invoke(this); }