
addObject = {}

function addObject.prerequisitesPresent(specializations)
	return SpecializationUtil.hasSpecialization(Attachable, specializations);
end;

function addObject:load(xmlFile)
	self.Cale1 = Utils.indexToObject(self.components, getXMLString(xmlFile, "vehicle.cale1#index"));
	self.Ridelle1 = Utils.indexToObject(self.components, getXMLString(xmlFile, "vehicle.ridelle1#index"));
	self.ridelleIsVisible = false;
end;

function addObject:delete()
end;

function addObject:mouseEvent(posX, posY, isDown, isUp, button)
end;

function addObject:keyEvent(unicode, sym, modifier, isDown)
end;

function addObject:readStream(streamId, connection)
end;

function addObject:writeStream(streamId, connection)
end;

function addObject:readUpdateStream(streamId, timestamp, connection)
end;

function addObject:writeUpdateStream(streamId, connection, dirtyMask)
end;

function addObject:update(dt)
	if self:getIsActiveForInput() then
		if InputBinding.hasEvent(InputBinding.LOWER_IMPLEMENT) then
			self.ridelleIsVisible = not self.ridelleIsVisible;
		end;
	
		if self.ridelleIsVisible then
			setVisibility(self.ridelle1, true);
		else
			setVisibility(self.ridelle1,false);
		end;		
	end;
end;
	
function addObject:updateTick(dt)
end;

function addObject:draw()
end;

function addObject:onAttach()
	setVisibility(self.Cale1, false);
end;

function addObject:onDetach()
	setVisibility(self.Cale1, true);
end;

