private void HandleEmotions(Emotion previousEmotion, Emotion emotion) { if (Emotion.Neutral.Equals(emotion) || Emotion.Relaxed.Equals(emotion) || Emotion.Tired.Equals(emotion)) { if (m_HardModeHandler.hardModeEnabled) { return; } m_HardModeHandler.Enable(); m_HardModeStartTime = Time.time; enemySpawner.enemies = levels[currentLevel].specialEnemies; enemySpawner.spawnTime = levels[currentLevel].spawnRate / 2; } else if (emotion.Equals(Emotion.Angry)) { enemySpawner.enemies = levels[currentLevel].enemies; enemySpawner.spawnTime = levels[currentLevel].spawnRate; m_HardModeHandler.Disable(); } else if (Emotion.Scared.Equals(emotion)) { if (!Emotion.Scared.Equals(previousEmotion)) { return; } enemySpawner.enemies = levels[currentLevel].enemies; enemySpawner.spawnTime = levels[currentLevel].spawnRate; m_HardModeHandler.Disable(); } }
private void HandleEmotion(Emotion previousEmotion, Emotion emotion) { Debug.Log(emotion); if (Progress.instance.IsLevelLoading || GameManager.instance.gameEnded || GameManager.instance.gamePaused) { return; } //TODO: Handle emotion (if bored or neutral spawn extra wave) if (emotion.Equals(Emotion.Happy) || emotion.Equals(Emotion.Neutral) || emotion.Equals(Emotion.Relaxed) || emotion.Equals(Emotion.Tired)) { SpawnWave(); } }