--[[
    Transitions the StateHolder into the specified stateName. Optional shouldForce boolean can override the transition
    check to ensure that the state can actually transition.
]]

function StateHolder:transition(stateName, shouldForce)
	if not shouldForce and not self:canTransition(stateName) then
		Logger.warn("Cannot transition state from", self.current, "->", stateName)
		return
	end

	self:_callTransitionCallbacks(self.current, stateName)

	self.current = stateName
end
