private void tick() {
        if(tickCount > 500){
            tickCount = 0;
            spawnTimer -= 10;
            System.out.println("Spawn rate increasing!");
            if(spawnTimer < 20) spawnTimer = 20;
        }
        if(spawnCount > spawnTimer){
            spawnCount = 0;
            EntityHandler.addEnemy(new Enemy());
        }
        for(int i = 0; i < EntityHandler.getEnemies().size(); i++){
            EntityHandler.getEnemies().get(i).tick();
        }
        player.tick();
        spawnCount++;
        tickCount++;
    }