local N={}N.__index=N N.ClassName=N function N.new()local C=setmetatable({},N)C._inputModes={}return C end function N.AddState(C,N)C._inputModes[#C._inputModes+1]=N or error("\078\111 \115\116\097\116\101")return C end function N.GetStates(N)return N._inputModes end function N.Evaluate(C,N)for C,F in pairs(C._inputModes)do F:Evaluate(N)end end return N
--- Process inputs by evaluating states
-- @classmod InputModeProcessor

local InputModeProcessor = {}
InputModeProcessor.__index = InputModeProcessor
InputModeProcessor.ClassName = InputModeProcessor

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

	self._inputModes = {}

	return self
end

function InputModeProcessor:AddState(state)
	self._inputModes[#self._inputModes+1] = state or error("No state")

	return self
end

function InputModeProcessor:GetStates()
	return self._inputModes
end

function InputModeProcessor:Evaluate(inputObject)
	for _, inputMode in pairs(self._inputModes) do
		inputMode:Evaluate(inputObject)
	end
end

return InputModeProcessor