GameOverState = class(Group, function(o)
	Group.init(o)

	if bludG.camera.tween then Tweener:removeTween(bludG.camera.tween) end
	if bludG.camera.scaletween then Tweener:removeTween(bludG.camera.scaletween) end
	bludG.camera.scroll = Vec2(0,0)
	bludG.camera.scale = 1

	o.blackout = o:add(Object(0,0,bludG.camera.w, bludG.camera.h))
	o.blackout:setColor(0,0,0,191)
	o.blackout.scrollFactor = Vec2(0,0)
	o.blackout.sprite = sprites['tiles']['white.png']
	o.blackout.drawType = 'stretched'
	o.blackout:setScrollFactor(Vec2(0,0))

	o.overlay = o:add(OverlayState(overlay_data['game_over'], o))
	o.overlay.touchDown = nil
	-- should add a button to exit so that it doesn't go too fast
	local groundHeight = 300*r_scale/2
	if ipad == '_ipad' then
		groundHeight = 365*r_scale/2
	end
	local pbw = 114
	local pby = bludG.camera.h-groundHeight/2-pbw/2
	o.playButtonY = pby
	o.playButton = o:add(FancyButton(bludG.camera.w/2-pbw/2,pby,"Yay"))
	o.playButton:setScrollFactor(Vec2(0,0))
	o.playButton.onPress = function()
		mainState:changeState(TitleScreenState())
	end
	o.playButton:setPosition(bludG.camera.w/2-o.playButton.svg:getMaxX()/2, pby)
end)