--
-- Brake
-- Specialization for Brake
--
-- @author  Manuel Leithner
-- @date  26/07/09
--

Brake = {};

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

function Brake:load(xmlFile)
	
	self.anlegeKl = {};
	self.anlegeKl[1] = Utils.indexToObject(self.components,getXMLString(xmlFile,"vehicle.anlegeklotz#index1"));
	self.anlegeKl[2] = Utils.indexToObject(self.components,getXMLString(xmlFile,"vehicle.anlegeklotz#index2"));
	
	
	
	setVisibility(self.anlegeKl[1], true);
	setVisibility(self.anlegeKl[2], false);
	
end;

function Brake:delete()
end;

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

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

function Brake:update(dt)
end;	
function Brake:draw()
end;


	


function Brake:onAttach(attacherVehicle)
	setVisibility(self.anlegeKl[1], true);
	setVisibility(self.anlegeKl[2], false);
end;

function Brake:onDetach()
	setVisibility(self.anlegeKl[2], true);
	setVisibility(self.anlegeKl[1], false);
end;




