--
-- 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"));	
end;


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

        if isDown and sym == Input.KEY_z then 
		           self.drawMirror1 = not self.drawMirror1;		           
		        setVisibility(self.mirrors[1], self.drawMirror1);
	  end;
	  		        
        if isDown and sym == Input.KEY_y then         
		           self.drawMirror2 = not self.drawMirror2;
    	      setVisibility(self.mirrors[2], self.drawMirror2);
    	  
	  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;