public void Collision()
    {
        Actor collision1 = getOneIntersectingObject(Spikyball2.class); 
        Actor collision2 = getOneIntersectingObject(Spikyball3.class);
        Actor collision3 = getOneIntersectingObject(Ghost.class);
    
        if(collision1 != null)//if you have not run into it 
        {
            if(SpikyballBelow == false)
            {
                counter.add(-1);
                Greenfoot.playSound("Ghosthit.wav");
                SpikyballBelow = true;
            }
        }
        else
        {
            SpikyballBelow = false;
        }
    
        if(collision2 != null)//if you have not run into it 
        {
            if(SpiderBelow == false)
            {
                counter.add(-1);
                Greenfoot.playSound("Ghosthit.wav");
               SpiderBelow = true;
            }
        }
        else
        {
            SpiderBelow = false;
        }
        if(collision3 != null)//if you have not run into it 
        {
           if(GhostBelow == false)
           {
               counter.add(-1);
               Greenfoot.playSound("Ghosthit.wav");
               GhostBelow = true;
           }
        }
        else
        {
            GhostBelow = false;
        }
    
    }