--[[
	Function called when the client is notified of a player state update.
]]

function UIController.onClientStateUpdated(currentState)
	if currentState == "pregame" then
		UIController.setView("pregame")
	elseif currentState == "warmup" then
		UIController.setView("warmup")
	elseif currentState == "game" then
		UIController.setView("game")
	elseif currentState == "spectating" then
		UIController.setView("spectating")
	elseif currentState == "finished" then
		UIController.setView("finished")
	elseif currentState == "dead" then
		UIController.setView("dead")
	elseif currentState == "postgame" then
		UIController.setView("postGame")
	end
end
