Beispiel #1
0
    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");
    }
Beispiel #2
0
    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;
    }
Beispiel #3
0
 public void DoneSpawnInfo(Spawner.Wave wave)
 {
     spawn.GetComponent <Text>().text = "You destroyed all the enemies! Get ready, there is a new wave! " + wave.name;
 }