--
-- self
-- Class for all self
--
-- @author  Mario
-- @date  25/04/10
--
-- Copyright (C) Mario

mirror = {};

function mirror.prerequisitesPresent(specializations)
    return SpecializationUtil.hasSpecialization(Motorized, specializations);
end;

function mirror:load(xmlFile)

    self.mirrors = {};
    self.mirrors[1] = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.mirrors.mirror1#index"));
    self.mirrors[2] = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.mirrors.mirror2#index"));
    self.mirrors[3] = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.mirrors.mirror3#index"));
    self.mirrors[4] = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.mirrors.mirror4#index"));
    self.mirrors[5] = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.mirrors.mirror5#index"));
    self.mirrors[6] = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.mirrors.mirror6#index"));
	
end;

function mirror:keyEvent(unicode, sym, modifier, isDown)

    if isDown and sym == Input.KEY_t then 
		self.drawMirror = not self.drawMirror;
		setVisibility(self.mirrors[1], self.drawMirror);
    	        setVisibility(self.mirrors[2], self.drawMirror);
                setVisibility(self.mirrors[3], self.drawMirror);
                setVisibility(self.mirrors[4], self.drawMirror);
                setVisibility(self.mirrors[5], self.drawMirror);
                setVisibility(self.mirrors[6], self.drawMirror);
	 end;

end;


function mirror:update(dt)
end;

function mirror:draw()
end;

function mirror:onEnter()

end;

function mirror:onLeave()
end;

function mirror:delete()
end;

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