Пример #1
0
    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);
                }
            }
        }
    }
Пример #2
0
 private void PlayerFinished()
 {
     PlayerAnimator.SetBool("Run", false);
     HasFinished = true;
     OnPlayerFinished?.Invoke(this);
 }