@Override
    public void act() {
        //Check actors
        for (Actor actor : (List<Actor>)getObjects(null)) {
            if (actor == helicopter || actor == scoreCounter || actor == muteButton) continue;
            

            actor.setLocation(actor.getX() + 40 - helicopter.getX(), actor.getY());
        }
        
        //PowerUp spawn
        if (Math.random() < 0.003) {
            Actor powerUp;
            switch (Greenfoot.getRandomNumber(2)) {
                case 0: powerUp = new SpeedPowerUp(); break;
                case 1: powerUp = new RadiusPowerUp(); break;
                default:
                    // Will never happen.
                    assert false;
                    return;
            }
            addObject(powerUp, -50 + Greenfoot.getRandomNumber(100), Greenfoot.getRandomNumber(40));
        }
        
        //Zorg ervoor dat bepaalde objecten een vaste plaats op het scherm hebben.
        helicopter.setLocation(40, helicopter.getY());
        scoreCounter.setLocation(6, 73);
        menuBar.setLocation(39, 75);
        health1.setLocation(60, 73);
        health2.setLocation(64, 73);
        health3.setLocation(68, 73);
        health4.setLocation(60, 77);
        health5.setLocation(64, 77);
        health6.setLocation(68, 77);
        hp.setLocation(60,64);
    
    }