public void Kill()
    {
        m_AudioManager.PlaySound(deathSound);

        Transform currentDeathParticle = (Transform)Instantiate(deathParticles, m_Transform.position, Quaternion.identity);

        Destroy(currentDeathParticle.gameObject, 1f);

        m_GameMaster.AddXP(xpDrop);
        m_GameMaster.ShakeCamera(cameraDeathShakeAmount, cameraDeathShakeLength);

        Destroy(gameObject);
    }
Beispiel #2
0
    void WaveCompleted()
    {
        m_State         = SpawnState.COUNTING;
        m_WaveCountdown = timeBetweenWaves;

        m_GameMaster.AddXP((int)(WaveCompletedXpDrop * waveDifficultyIncreaseRate));

        Wave wave = new Wave {
            enemy = m_Waves[m_CurrentWave].enemy,
            rate  = m_Waves[m_CurrentWave].rate * waveDifficultyIncreaseRate,
            count = (int)(m_Waves[m_CurrentWave].count + waveDifficultyIncreaseRate)
        };

        m_Waves.Add(wave);
        m_CurrentWave++;
    }