

Kardinal = {};

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

function Kardinal:load(xmlFile)

	self.supportFeet = {};
	self.supportFeet.minTrans = Utils.getNoNil(getXMLFloat(xmlFile, "vehicle.supportFeet#minTrans"), 0);
	self.supportFeet.maxTrans = Utils.getNoNil(getXMLFloat(xmlFile, "vehicle.supportFeet#maxTrans"), 0);

end;

function Kardinal:delete()

end;

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

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

function Kardinal:update(dt)

end;

function Kardinal:draw()

end;

function Kardinal:onAttach(attacherVehicle)			

	local x,y,z = getTranslation(self.componentJoints[7].jointNode)
	setTranslation(self.componentJoints[7].jointNode, x, self.supportFeet.maxTrans, z);
	setJointFrame(self.componentJoints[7].jointIndex, 1, self.componentJoints[7].jointNode);

end;

function Kardinal:onDetach()

	local x,y,z = getTranslation(self.componentJoints[7].jointNode)
	setTranslation(self.componentJoints[7].jointNode, x, self.supportFeet.minTrans, z);
	setJointFrame(self.componentJoints[7].jointIndex, 1, self.componentJoints[7].jointNode);	

end;

function Kardinal:onLeave()

end;
