public void RamEnemy(BaseEnemy enemy) { if (_currentRamCooldown == 0) { enemy.RegisterDamage(_damage, ArmorTypes.None); _currentRamCooldown = _ramCooldown; } }
private void SpawnNextEnemy() { var enemySpawnData = _enemiesToSpawnQueue.Dequeue(); BaseEnemy enemy = null; switch (enemySpawnData.EnemyType) { case EnemyType.Simple: enemy = new SimpleEnemy(); break; case EnemyType.Fast: enemy = new FastEnemy(); break; case EnemyType.Slow: enemy = new SlowEnemy(); break; case EnemyType.Flying: enemy = new FlyingEnemy(); break; case EnemyType.Accelerating: enemy = new AcceleratingEnemy(); break; case EnemyType.Invisible: enemy = new InvisibleEnemy(); break; case EnemyType.Spawned: enemy = new SpawnedEnemy(); break; case EnemyType.Spawning: enemy = new SpawningEnemy(); break; case EnemyType.Spiked: enemy = new SpikedEnemy(); break; } enemy.Spawn(_spawnPoints[enemySpawnData.SpawnPointId]); }