コード例 #1
0
    protected override void RestartGame()
    {
        base.RestartGame();

        Bank = 0;
        _playerLastThrowValue = 0;
        _enemyLastThrowValue  = 0;
        _numberThrows         = 0;

        OnResetThrowsPresenter?.Invoke();
        OnChangedBank?.Invoke(Bank);
    }
コード例 #2
0
    private IEnumerator ShowSmoothChangeBank(int targetBank)
    {
        while (Bank != targetBank)
        {
            yield return(new WaitForEndOfFrame());

            Bank = (int)Mathf.MoveTowards(Bank, targetBank, _smoothSpeed * Time.fixedDeltaTime);

            OnChangedBank?.Invoke(Bank);
        }

        OnResetThrowsPresenter?.Invoke();

        _smoothChangeBank = null;
    }