--[[
	Stage implementation
]]


local Lobby = {}
Lobby.__index = Lobby
Lobby.PlayerAddedConnection = nil

function Lobby.new(gameStageHandler)
	local self = setmetatable({
		gameStageHandler = gameStageHandler,
	}, Lobby)

	return self
end

function Lobby:playerAdded(player)
	-- Load the character (behind the camera) so StarterGui replicates
	Util.loadCharacter(player)

	player.DevComputerMovementMode = Enum.DevComputerMovementMode.Scriptable
	player.DevTouchMovementMode = Enum.DevTouchMovementMode.Scriptable
end

function Lobby:initialize()
	MatchmakingLobby.run()
end

function Lobby:destroy()
	self.PlayerAddedConnection:disconnect()
	self.PlayerAddedConnection = nil
end
