private void removeDeadParticles() {
        for (int particleIndex = 0; particleIndex < particleArray.length; particleIndex++) {
            if (particleArray[particleIndex] != null) {
                if (particleArray[particleIndex].isParticleAlive() == false) {
                    particleArray[particleIndex] = null;
                }
            }
        }
    }