void OnNewWave(int waveIndex) { Spawner.Wave wave = mWaveSpawner.GetWaveByIndex(waveIndex); TextWaveTitle.text = "- " + wave.tag + " -"; TextWaveEnemyCount.text = "Enemies " + (wave.infinite ? "∞" : "×" + wave.enemyCount); StopCoroutine("AnimWaveInfoBanner"); StartCoroutine("AnimWaveInfoBanner"); }
public void SetCharacteristics(Spawner.Wave currentWave) { _pathFinder.speed = currentWave.MoveSpeed; if (_hasTarget) { _damage = Mathf.Ceil(_targetEntity.StartingHealth / currentWave.HitsToKillPlayer); } StartingHealth = currentWave.EnemyHealth; ParticleSystem.MainModule deathEffectMain = DeathEffect.main; deathEffectMain.startColor = new ParticleSystem.MinMaxGradient { color = new Color(currentWave.SkinColor.r, currentWave.SkinColor.g, currentWave.SkinColor.b, 1) }; _skinMaterial = GetComponent <Renderer>().material; _skinMaterial.color = currentWave.SkinColor; _originalColor = _skinMaterial.color; }
public void DoneSpawnInfo(Spawner.Wave wave) { spawn.GetComponent <Text>().text = "You destroyed all the enemies! Get ready, there is a new wave! " + wave.name; }