private void dealtDamage()
    {
        if (player.equals("P1"))
        {
            if (direction)
            {
                getWorld().addObject(new P1AttackArea(x,y,1000,50,1,0,2.0,2,direction),x, y);
            } 
            else
            {   
                getWorld().addObject(new P1AttackArea(x,y,1000,50,1,0,2.0,2,direction),x, y);
            }
        }
        else  if (player.equals("P2"))
        {
            if (direction)
            {
                getWorld().addObject(new P2AttackArea(x,y,1000,50,1,0,2.0,2,direction),x, y);
            } 
            else
            {   
                getWorld().addObject(new P2AttackArea(x,y,1000,50,1,0,2.0,2,direction),x, y);
            }
        }
    }