--!strict
--[[
	PlayerModule - This module requires and instantiates the camera and control modules,
	and provides getters for developers to access methods on these singletons without
	having to modify Roblox-supplied scripts.

	2018 PlayerScripts Update - AllYourBlox
--]]


local PlayerModule = {}
PlayerModule.__index = PlayerModule

function PlayerModule.new()
	game.Players.LocalPlayer.PlayerGui:WaitForChild("CoreGUI",999)
	game.Players.LocalPlayer.PlayerGui.CoreGUI.LocalGod.Inited.Event:Wait()
	local self = setmetatable({},PlayerModule)
	self.cameras = require(script:WaitForChild("CameraModule"))
	self.controls = require(script:WaitForChild("ControlModule"))
	self.backpack = require(script:WaitForChild("BackpackModule"))
	return self
end

function PlayerModule:GetCameras()
	return self.cameras
end

function PlayerModule:GetControls()
	return self.controls
end

function PlayerModule:GetClickToMoveController()
	return self.controls:GetClickToMoveController()
end

return PlayerModule.new()
