-- UNIA_IBIS_XXL
-- Specialization for Unia Ibis
--
-- Author: Lipa
-- Datum 29/07/12

UNIA_IBIS_XXL = {};

function UNIA_IBIS_XXL.prerequisitesPresent(specializations)
    return true; 
end;


function UNIA_IBIS_XXL:load(xmlFile)
end;

function UNIA_IBIS_XXL:delete()
end;

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

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

function UNIA_IBIS_XXL:update(dt)
end;

function UNIA_IBIS_XXL:updateTick(dt)
    setJointFrame(self.componentJoints[2].jointIndex, 0, self.componentJoints[2].jointNode); 
end;

function UNIA_IBIS_XXL:draw()
end;

function UNIA_IBIS_XXL:onAttach()

	if self.attacherVehicle and not self.rotationMax then
		local animTimeStuetze = nil;
		if self:getIsAnimationPlaying("StuetzeNormal") then			
			animTimeStuetze = self:getAnimationTime("StuetzeNormal");
		end;
		self:playAnimation("StuetzeNormal", 1, animTimeStuetze, true);
	end;

	if self.attacherVehicle and self.rotationMax then
		local animTimeStuetze = nil;
		if self:getIsAnimationPlaying("StuetzeInvert") then			
			animTimeStuetze = self:getAnimationTime("StuetzeInvert");
		end;
		self:playAnimation("StuetzeInvert", 1, animTimeStuetze, true);
	end;	
end;

function UNIA_IBIS_XXL:onDetach()

	if not self.attacherVehicle and not self.rotationMax then
		local animTimeStuetze = nil;
		if self:getIsAnimationPlaying("StuetzeNormal") then			
			animTimeStuetze = self:getAnimationTime("StuetzeNormal");
		end;
		self:playAnimation("StuetzeNormal", -1, animTimeStuetze, true);	
	end;	

	if not self.attacherVehicle and self.rotationMax then
		local animTimeStuetze = nil;
		if self:getIsAnimationPlaying("StuetzeInvert") then			
			animTimeStuetze = self:getAnimationTime("StuetzeInvert");
		end;
		self:playAnimation("StuetzeInvert", -1, animTimeStuetze, true);	
	end;		
end;