     func playerDeter() {
         badGuys?.particleBirthRate *= 0.999
         
-        for enemy in enemyList {
+        for enemy in enemyArray {
             if enemy!.intersects(badGuys!) {
                 badGuys?.particleBirthRate *= 0.999
             }

    // MARK: Internal SKNode and texture references
    fileprivate var spinnyNode : SKShapeNode?
    fileprivate var badGuys : SKEmitterNode?
    var enemyList = [SKSpriteNode?](repeating: nil, count: 0)
    let atlas = SKTextureAtlas(named: "Enemy Sprite Atlas")
    
    // MARK: Enemy texture matrix.
    var textureMatrix = [[SKTexture?]](repeating: [SKTexture?](repeating: nil, count: 4), count: 3)
    
    // MARK: Configuration variables.
    let spinnyStuff = UserDefaults.standard.value(forKey: "spinnyStuff") ?? false

        enemy.yScale = 0.6
        self.addChild(enemy)
        
        enemyArray.append(enemy)
        
        // Spawn more enemies
        enemy.run((SKAction.sequence([moveEnemy, waitRandom,SKAction.removeFromParent()])), completion: {
