RoomRoot = class(RoomRentable, function(o, x, y, world)
	local size = 60* r_scale
	
	RoomRentable.init(o, x, y, world)
	o.h = size*2
	o.drawType = 'svg'
	o.svg = SvgLoader(svg_root .. "hotels/".. player.currentWorld.id .. "_hotel.svg", true)
	o.svg:setPosition(x, y)
	Room.setHealth(o, game_settings["room_root_health"], game_settings["room_root_health"])
	if o.healthDisplay then
		o.healthDisplay:setPosition(x, y+o.h-o.healthSize)
	end
	print('setting pos', y+o.h*2-o.healthSize)
end)

--------------------------------------------------------------------------------------------------
RoomCycleShooter = class(Room, function(o, x, y, world)
	Room.init(o, x, y, world)
	o.bulletRate = 5
	o.nextBullet = o.bulletRate
	o.bCount = 24
	o.shotCount = 0
end)
function RoomCycleShooter:sync()
	if self.alive then
		Room.sync(self)
		if self.nextBullet > 0 then self.nextBullet = self.nextBullet - 1 end
		if self.nextBullet == 0 then
			pd:startList("fromOF")
			pd:addSymbol("shootBlue")
			pd:addFloat(self.shotCount)
			pd:finish("fromOF")
			self.nextBullet = self.bulletRate
			if not self.world.bullets then
				self.world.bullets = self.world:add(Group())
			end
			self.shotCount = self.shotCount + 1
			-- spawn a set of bullets shooting out in a circle
			local angle = 360/self.bCount*self.shotCount
			local direction = Vec2(0,1)
			direction:normalize()
			direction:rotate(math.rad(angle))
			direction:mult(100)
			local b = self.world.bullets:addRecycle(Bullet(self:center().x, self:center().y))
			b.velocity = direction
		end
	end
end
RoomCycleShooter.cost = 500
RoomCycleShooter.color = {r=255, g=255, b=255, a=255, rtype=RoomCycleShooter, typecount=3}
