Esempio n. 1
0
    private void OnDisplaced(float displacementChange)
    {
        if (!_isDisplaced)
        {
            _isDisplaced = true;
            if (_assignedEnemyWave != null)
            {
                _assignedEnemyWave.IncreaseWaveMultiplier();

                //pop with coroutine!
                IEnumerator popWaveScoreCoroutine = _assignedEnemyWave.OnWaveMultiplierIncreased();
                StartCoroutine(popWaveScoreCoroutine);
            }
        }

        if (_assignedEnemyWave != null)
        {
            _assignedEnemyWave.AddDisplacementScore(displacementChange);
        }
    }